Set Current time in the timepicker

2 posts, 1 answers
  1. Froggy
    Froggy avatar
    16 posts
    Member since:
    Apr 2012

    Posted 30 Apr 2012 Link to this post


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

    I tried this, but it does not work:

    startTimePicker.Value = DateTime.Now.Date;

  2. Answer
    Deyan avatar
    2026 posts

    Posted 01 May 2012 Link to this post

    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,
    the Telerik team

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

  3. DevCraft banner
Back to Top