Timepicker always displays midnight on blur

1 Answer 29 Views
Date/Time Pickers
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Lee asked on 09 Nov 2021, 06:37 PM | edited on 09 Nov 2021, 06:38 PM

I am having an issue where when I select a different time from the timepicker it is reverting back to zero. I have created a dojo with 2 timepickers. Both are initiated in a loop and stored in an object with the key being the id of the input. My issue is that if I set dateInput to true the time reverts back to midnight on blur. When I console.log the value though it is the value I picked. This is only an issue on the timepicker that has the min and max options set. I need the user to be able to input a time using the datepicker formatting and only choose from select times. 

Dojo:

https://dojo.telerik.com/@dojolee/UQuBiNoV

 

1 Answer, 1 is accepted

Sort by
0
Georgi Denchev
Telerik team
answered on 12 Nov 2021, 09:06 AM

Hi, Lee,

Thank you for the provided Dojo.

You need to update the min/max configurations of the dateInput as well:

  timePickers["reviewScheduledStartTime"]._dateInput.setOptions({
      	min: new Date(2000, 0, 1, 8, 0, 0),
        max: new Date(2000, 0, 1, 23, 0, 0)
    });

Modified Dojo:

https://dojo.telerik.com/@gdenchev/EBOyaQeD 

Let me know if you have any questions.

Best Regards,
Georgi Denchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Date/Time Pickers
Asked by
Lee
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Georgi Denchev
Telerik team
Share this question
or