Last Updated: 21 Aug 2019 06:50 by ADMIN
Created on: 14 Aug 2019 07:35
Category: Date/Time Pickers
Type: Bug Report
datetime picker does not show current date if empty

dojo example


we set same data for all 3 pickers, 1 & 3 open immediately as soon as we set the date & than clear them, 2 first clear than open, in the end all cleared but some still show any date but current


what we want:

if we set the date & than cleared DP, DP should show current date despite was it opened or not

1 comment
Posted on: 21 Aug 2019 06:50
Hi Aleksandr,

Thank you for the provided Dojo sample along with details related to the case.

By default, from a User Experience point of view, all of the Date pickers remember the last view in which they have been opened. Therefore, if you navigate to a different month, close and reopen the picker, the last view would be shown. 

Regarding the example provided, there is a difference between the order of opening and erasing the value. Here are a few clarifications on each of the scenarios:; // First, open the picker
kendoDatePicker1.value(""); // Second, clear the value

In the example above, firstly the picker would be opened in the view in which the initial value is. Then, it would be erased. And if it gets closed and reopened, it would automatically navigate to the lastly selected view (1/1/2011). This best could be explained with a setTimeout method.

In the second case, first the value is erased and then, the picker is opened. In this case, at the time of opening, the picker would not have a value. And, by design, the view would be the one which contains the "today" date. It is important to point out that only once the default view would be opened. If you navigate to the next month, close and reopen the picker, the next month would be in the view. 

If you would like to change the behavior of the picker when the value is null and the view which shows, you can use its API. And more specifically, the navigate() method. More information could be found here:

Let me know in case further clarifications are needed.

Kind regards,
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.