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

48 Hours clock

3 Answers 143 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Gilbert van Veen
Top achievements
Rank 1
Gilbert van Veen asked on 21 Feb 2012, 02:16 PM
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.

3 Answers, 1 is accepted

Sort by
0
Ivo
Telerik team
answered on 24 Feb 2012, 01:50 PM
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 >>
0
Gilbert van Veen
Top achievements
Rank 1
answered on 29 Feb 2012, 08:45 AM
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?
0
Ivo
Telerik team
answered on 29 Feb 2012, 08:18 PM
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 >>
Tags
DateTimePicker
Asked by
Gilbert van Veen
Top achievements
Rank 1
Answers by
Ivo
Telerik team
Gilbert van Veen
Top achievements
Rank 1
Share this question
or