4 Answers, 1 is accepted
0
Hello Sarah,
the time portion will be 12:00 AM. This is the default behavior of the Date and that is why when the end user selects a day from the Calendar the time is midnight. If you need to define default time for the DateTimePicker, you will need to set a value to the widget. Check this jsBin demo.
All the best,
Georgi Krustev
the Telerik team
The DateTimePicker widget persist the time part of the Date object, if a value is set though the initialization of the widget. When create a new Date, like this:
new
Date(2000, 10, 10); -> time is 12:00 AM
All the best,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Eric
Top achievements
Rank 1
answered on 01 Jul 2014, 12:49 PM
If I may ask a question regarding your jsBin Demo, I noticed that when you enter in the month portion of the new Date() function, the month shown in the KendoUI DateTimePicker is always a month ahead. I have to enter in the month value with a "- 1" attached to it for the correct month to show. Is this a quirk of Javascript or of the Kendo control?
See the attached screenshot and look at month value entered and what is actually showing.
Thanks,
Eric Dickey
See the attached screenshot and look at month value entered and what is actually showing.
Thanks,
Eric Dickey
0
Hello Eric,
The JavaScript Date accepts zero based value for month parameter. I would suggest you check the documentation of JavaScript Date object.
Regards,
Georgi Krustev
Telerik
The JavaScript Date accepts zero based value for month parameter. I would suggest you check the documentation of JavaScript Date object.
Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Eric
Top achievements
Rank 1
answered on 02 Jul 2014, 11:50 AM
Georgi,
Thanks for the response. After 15 years of programming, I am just now having to deal with javascript, having developed mostly for the desktop and wasn't aware of that. Thanks again.
Eric
Thanks for the response. After 15 years of programming, I am just now having to deal with javascript, having developed mostly for the desktop and wasn't aware of that. Thanks again.
Eric