Search and Top Navigation
#5574 closed feature (wontfix)
Opened April 30, 2010 02:18PM UTC
Closed October 11, 2012 05:35PM UTC
Last modified October 11, 2012 09:15PM UTC
Extend DatePicker with a NotifyUpdate event.
Reported by: | Reinout | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | ui.datepicker | Version: | 1.8 |
Keywords: | event notifyupdate update | Cc: | |
Blocked by: | Blocking: |
Description
After updating the date in the input text field, the DatePicker gets updated automatically, re-rendering the date control.
When using the DatePicker control as a DateTimePicker (i.e. extending it with a time section underneath the date section), an event notifying this update to inheriting controls would make life a lot easier : it will be possible to re-render the time controls as well.
e.g.
...
_updateDatepicker: function(inst) { ...
this._notifyUpdate(inst);
},
/* Notify update of datepicker. */
_notifyUpdate: function(inst) {
var onNotifyUpdate = this._get(inst, 'onNotifyUpdate');
if (onNotifyUpdate)
onNotifyUpdate.apply();
},
...
This could then be used in the add-on as follows :
...
var tp = new Timepicker();
...
onNotifyUpdate: function (inst) {
tp.addTimePicker();
if ($.isFunction(o['onNotifyUpdate'])) o.onNotifyUpdate(inst);
}
...
Attachments (1)
Change History (3)
Changed March 17, 2011 04:18PM UTC by comment:1
Changed October 11, 2012 05:35PM UTC by comment:2
resolution: | → wontfix |
---|---|
status: | new → closed |
Datepicker already calls three different methods when this happens: _setDateFromField()
, _updateAlternate()
, and _updateDatepicker()
. Just pick the most appropriate one and proxy it.
Changed October 11, 2012 09:15PM UTC by comment:3
milestone: | TBD |
---|
Milestone TBD deleted
I have a similar issue and similar implementation.
Would be very usefull this event.