View Full Version : [CLOSED][3.1] Ext.DatePicker and update event

23 Dec 2009, 6:24 AM
In the latest versions of the DatePicker was removed the event "update".
I did not understand this choice, since it is the only way to change the DataPicker at rendering time, (for example, change the appearance of a cell by a certain date).

I hope that will be reintroduced in future releases.

Manzoni Fausto

23 Dec 2009, 7:05 AM
In which Ext version did you find an 'update' event in DatePicker?

I checked Ext 2.x, 3.0.x and 3.1.x, but didn't find one. DatePicker does have an 'update' method, but that hasn't changed in Ext 3.1.

23 Dec 2009, 9:59 AM
Damn! I'm very sorry.
This was my addition, but honestly I do not recall having done.

Forgive me!
Here's my changes:
Line: 162

* @event select
* Fires when a date is selected
* @param {DatePicker} this DatePicker
* @param {Date} date The selected date
'select', 'update'
Line 767:

update : function(date, forceRefresh){
this.fireEvent('update', this);
I have read other forum posts about the topic DatePicker events, so if you want to consider this change, I'd be grateful.

Manzoni Fausto

23 Dec 2009, 10:17 AM
marking this thread [CLOSED] then.

23 Dec 2009, 11:54 AM
You can also do that with an inline override:

var dp = new Ext.DatePicker({
update: function(date, forceRefresh){
this.constructor.prototype.update.call(this, date, forceRefresh);
// do stuff