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

Set Current time in the timepicker

1 Answer 353 Views
TimePicker and TimeSelector
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Froggy
Top achievements
Rank 2
Froggy asked on 30 Apr 2012, 10:11 PM
Hi, 

Is it possible to set the current time in the TimePicker.

I tried this, but it does not work:

startTimePicker.Value = DateTime.Now.Date;

Thanks!

1 Answer, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 01 May 2012, 12:49 PM
Hi Steven,

Thanks for writing and for your question.

DateTime.Now.Date will return you the current date, not the current time. You can either use the DateTime.Now value or DateTime.Now.TimeOfDay.

I hope this helps. 

Kind regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TimePicker and TimeSelector
Asked by
Froggy
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Share this question
or