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

Default Time

1 Answer 64 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Terry Foster
Top achievements
Rank 1
Terry Foster asked on 14 Aug 2010, 01:32 AM
Hi,

When the SelectedValue of this control is initially null and you select a new date from calendar control, the default time is current time.  I would like to make the default time something else (usually 12:00).  Is there any way to do this?  I'm willing to override the control.

Thanks,
Terry

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 18 Aug 2010, 11:42 AM
Hi Terry Foster,

The SelectedValue property is merging the SelectedDate and SelectedTime properties. It means that  setting the picker.SelectedTime = new TimeSpan(12, 0, 0) - will update the SelectedValue with time 12:00:00. Otherwise you can just used the picker.SelectedValue.Value.Date property that will retrieve only the selected date and time equals to 12:00:00.

All the best,
Kaloyan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DateTimePicker
Asked by
Terry Foster
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or