-
23 May 2012 12:36 AM #1
DateField doesn't fire CHANGE event when using date picker
DateField doesn't fire CHANGE event when using date picker
Hi,
I think i found a bug in DateField. I noticed that "Change" event is not fired when date is selected using calendar/date picker widget. Could you please let me know if it is expected behaviour and i should handle some other event or that is an error.
Kuba
-
23 May 2012 1:07 AM #2
The change event only fires when you blur the field. This is in common with the default browser change event. Also all other fields behave like this. We maybe can add another event to fit your needs. We already did the same for combobox.
I will move this thread to the bugs forum.
-
23 May 2012 3:05 AM #3
That is right but ChangeEvent is not fired onblur as well. When you select date using datePicker then FieldDate gets focus and then when you click outside (blur) the field ChangeEvent is not fired. I know this happens because native events are not fired when change is result of java script action but it would be great to modify that behaviour.
-
23 May 2012 3:45 AM #4
Thanks for clarifiying. We will update the thread once we have a solution ready.
-
25 May 2012 5:04 AM #5
I was in the process of trying to figure out why DateField validation didn't work anymore. I guess this thread solves that.
At any rate, I think it did work with
in earlier development versions. But I can be mistaken.Code:dateFrom.addValueChangeHandler(new ValueChangeHandler<Date>() { @Override public void onValueChange(ValueChangeEvent<Date> event) { ... } });
I can trigger the event by changing the focus to a second DateField.
-
5 Dec 2012 12:35 PM #6
I do not believe this bug was fixed in 3.0.1. Looking at:
http://www.sencha.com/examples/#Exam...e:formsexample
The birthday field fires the value change event where it should including when using the date picker.
Is anyone still seeing this issue?
-
13 Feb 2013 7:40 AM #7
I had the same issue. I changed my code to
and it works.Code:dateField.getDatePicker().addValueChangeHandler()
Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.


Reply With Quote