Skip to main content

Search and Top Navigation

#3146 closed bug (fixed)

Opened July 30, 2008 02:13PM UTC

Closed August 02, 2008 10:59AM UTC

Inconsistent year/month change notify (user callback)

Reported by: bavinckp@casema.nl Owned by: grabanski
Priority: major Milestone:
Component: ui.datepicker Version: 1.5.2
Keywords: onChangeMonthYear Cc:
Blocked by: Blocking:
Description

Changing month/year can be done in differnt ways:

1. prev/next button

2. select boxes

3. setDate

1. In all of these case the notify month/year (user callback function) should be send at the same time.

My strong preference is for this to take place BEFORE the calendar is drawn. This is the behaviour of the prev/next buttons.

2. The select boxes also send the notify but AFTER the calendar has been drawn. This is unfortunate, because this prevents the developer to for instance update dynamic special day before the calendar is drawn.

Suggested fix: change the order of ´this._adjustDate(target);´ and ´this._notifyChange(inst);´ in "_selectMonthYear: function(id, select, period)".

3. the setDate does not send a notify at all (add ´this._notifyChange(inst);´ before ´this._updateDatepicker(inst);´ in ´_setDateDatepicker: function(target, date, endDate)´, preferably with some intelligence checking whether month-year actually changed.

Attachments (0)
Change History (1)

Changed August 02, 2008 10:59AM UTC by kbwood comment:1

resolution: → fixed
status: newclosed

Fixed. onChangeMonthYear is now called before the change is rendered and is now triggerred by setDate if necessary.