#5574 closed feature (wontfix)
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(oonNotifyUpdate?)) o.onNotifyUpdate(inst);
}
...
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | jquery.ui.datepicker.js added |
---|
comment:1 Changed 12 years ago by
I have a similar issue and similar implementation. Would be very usefull this event.
comment:2 Changed 10 years ago by
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.
Update DatePicker js