This is a migrated thread and some comments may be shown as answers.
DatePicker value() is returned as old value in onChange event
2 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Amit
Top achievements
Rank 1
Amit asked on 04 Aug 2011, 09:46 PM
I have a FromDate and ToDate. In FromDate's onChange event, I want to set the ToDate's min as the date selected in FromDate. However, in onChange event the value() returns the value that is old i.e. not the selected value but the value that is already in the control.

And setting the min or max also exhibits bizarre behavior as the value is set in the ToDate and the popop remains open, kind of stuck.

2 Answers, 1 is accepted

Sort by
0
Eugenio
Top achievements
Rank 1
answered on 08 Oct 2011, 05:38 PM
i have the some problem, onChange event the value() returns old value
0
Amit
Top achievements
Rank 1
answered on 10 Oct 2011, 05:16 PM
I ended up adding a delay (~500ms) and then it worked fine. It seems that the control itself is doing something in the onchange event and so the value is not yet set. This may also be fixed in a later version.
Tags
Date/Time Pickers
Asked by
Amit
Top achievements
Rank 1
Answers by
Eugenio
Top achievements
Rank 1
Amit
Top achievements
Rank 1
Share this question
or