Skip to main content

Search and Top Navigation

#3891 closed enhancement (fixed)

Opened January 20, 2009 04:23PM UTC

Closed July 22, 2009 08:37AM UTC

Autosize input field

Reported by: mdiaz Owned by:
Priority: minor Milestone: 1.8
Component: ui.datepicker Version: 1.6rc5
Keywords: Cc:
Blocked by: Blocking:

Set the input field size attribute (if not already set) based on an estimate: the length of a formatted date (e.g. today's date).

This could be disabled with a flag in the settings (e.g. autosize=true/false).

A working implementation: add the following two lines to _connectDatepicker:

if (this._get(inst, 'autosize') && !input.attr('size'))

input.attr('size', this.formatDate(this._get(inst, 'dateFormat'), new Date(), this._getFormatConfig(inst)).length);

Attachments (0)
Change History (2)

Changed March 08, 2009 02:40PM UTC by rdworth comment:1

milestone: 1.71.8

Changed July 22, 2009 08:37AM UTC by kbwood comment:2

resolution: → fixed
status: newclosed

Fixed in r2957. Set the autoSize option to true.