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

DateTimePicker default time when date selected

1 Answer 275 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Barry
Top achievements
Rank 1
Barry asked on 23 Jul 2012, 03:10 PM
Is there a way to set the default time that is selected when a date is selected? Currently if you select a date it defaults the time to 12:00AM even if you have the time selector start and end times set. I would like the time to be set to something else by default. You would think that if you can only choose between 7:00AM and 5:00PM on the time side, the date picker wouldn't let the time be set at 12:00AM, or at least it wouldn't default to it - which it does.

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 26 Jul 2012, 11:14 AM
Hi Barry,

First I want to thank you for reporting the issue with 12:00 AM default time being selected when StartTime and EndTime shouldn't allow it. We have logged it in our Public Issue Tracker System where you can track its status and vote for it.

In order to change the default time of the DateTimePicker control you can use the SelectionChanged event and set the SelectedTime property to the value you desire. I have prepared and attached a sample project representing the described approach, give it a try.

Kind regards,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DateTimePicker
Asked by
Barry
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or