48 Hours clock

4 posts, 0 answers
  1. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 21 Feb 2012 Link to this post

    Hi,

    I am using the RadDateTimePicker in TimePicker mode to enable the user to enter time.

    I have two TimePickers in my grid.

    1. Start Time
    2. End Time

    The start time can be 22:30 and the end time can be 01:00. Actually it would be nicer to use (in this case) a 48 hour clock.

    The user should enter 25:00 instead of 01:00. This would make it a lot easier to read and explain to the customer, is this possible?

    Another way to solve it is to add an extra checkbox next to the timepickerbutton which can be checked. By checking the box, you tell the system/user the time of the next day is ment.

    Please advice in this matter.

  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 24 Feb 2012 Link to this post

    Hi Gilbert,

    Currently, RadTimePicker is designed to display values in the range 0 to 24, so it won't be able to display anything higher than 24:00.

    I didn't actually understand the other way to solve this. Can you please give us more details so we could advise you on this?

    Greetings,
    Ivo
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 29 Feb 2012 Link to this post

    The checkbox can be used (or another control) to "tell" the application that the entered time is for the previous day or current day. It is a little work around.

    Which component can be used the best for entering amount/duration? In other words I need a control where I can enter, lets say, 100:30 (hundred hours and thirthy minutes?
  5. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 29 Feb 2012 Link to this post

    Hello Gilbert,

    I would suggest you to use the RadDateTimePicker in TimePicker input mode again with little modifications. Firstly set the DateTimeWatermarkContent property to something like "Enter duration" (depends on your scenario). After this set RadDateTimePicker DateTimeFormat to 24 hours mode so it will display 13:00 instead of 1:00. Here is sample code:
    this.RadTimePicker.Culture = new System.Globalization.CultureInfo("en-US");
    this.RadTimePicker.Culture.DateTimeFormat.ShortTimePattern = "HH:mm";

    I hope this will help you.

    Greetings,
    Ivo
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top