This is a migrated thread and some comments may be shown as answers.

DatePicker not updating rightaway when invoking max() or min() - with jsbin

1 Answer 594 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 06 Aug 2013, 01:07 PM
We have the requirement to provide a dynamically changeable date picker that supports changing the min and max options.

Please see this jsbin for an example: http://jsbin.com/uqukuk/1/edit

When you click the "Increase Max Date" button, the max option of the first date picker is adjusted. However, when I open the popup it still shows the old value. Only after I opened the second date picker once (this one is only on the screen to showcase this) I can see the changes in the first one.

So, to summarize:
1. Click "Increase Max Date"
2. Open first date picker popup
3. Expected: MaxDate of Aug. 29th, Actually seeing: still the old max value of Aug. 22nd

1. Click "Increase Max Date"
2. Open the second date picker popup
3. Click away without selecting anything
4. Open the first date picker popup
5. Now the max is correctly adjusted

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 06 Aug 2013, 03:11 PM
Hello Stefan,

I have already answered your question in the support ticket that you opened. But I will copy my answer here, if somebody else has the same problem:

This is an issue with the max() method of the Kendo UI DatePicker. I have logged it in our system and it will be fixed. In the mean time I have created a workaround for you that is implementing the functionality you are looking for - it is based on your example. Just to follow the best practices I have created the DatePicker out of an input element, and I am using valid JavaScript dates for the configuration properties.
 
Please check this jsBin for the above mentioned workaround:
 

 

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Date/Time Pickers
Asked by
Stefan
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or