Am I aiming for the wrong thing to think I can use the RadTimePicker to select a Timepsan?
I need get rid of the AM PM and also stop it from thinking/displaying 00:00:00 as 12:00PM?
ohhh and what exactly am i binding to? SelectedTime={binding TimeSpan}?
thanks in advance
Michael
I need get rid of the AM PM and also stop it from thinking/displaying 00:00:00 as 12:00PM?
ohhh and what exactly am i binding to? SelectedTime={binding TimeSpan}?
thanks in advance
Michael
5 Answers, 1 is accepted
0
Michael
Top achievements
Rank 1
answered on 30 Jul 2012, 02:28 AM
just a kick
telerik are usually so helpful in these matters
telerik are usually so helpful in these matters
0
Hi Michael,
In order to achieve this using the RadTimePicker you will have to set its Culture property. Also you will have to use the SelectedTime property to get the TimeSpan value of the RadTimePicker. Here is sample code:
All the best,
Ivo
the Telerik team
In order to achieve this using the RadTimePicker you will have to set its Culture property. Also you will have to use the SelectedTime property to get the TimeSpan value of the RadTimePicker. Here is sample code:
public
MainWindow()
{
InitializeComponent();
var culture =
new
CultureInfo(
"en-US"
);
culture.DateTimeFormat.ShortTimePattern =
"HH:mm"
;
this
.RadTimePicker.Culture = culture;
}
All the best,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Michael
Top achievements
Rank 1
answered on 01 Aug 2012, 03:40 PM
thanks for the reply.
The timepicker in my solution is within a DataFormDataField??
So it cant be addressed like this.RadTimePicker?
The timepicker in my solution is within a DataFormDataField??
So it cant be addressed like this.RadTimePicker?
0
Hi Michael,
If you don't have any other controls using the ShortTimePattern into your DataForm I would suggest you to change its Culture property. Otherwise you will have to iterate through the VisualTree to find the RadTimePicker control and set its culture.
Regards,
Ivo
the Telerik team
If you don't have any other controls using the ShortTimePattern into your DataForm I would suggest you to change its Culture property. Otherwise you will have to iterate through the VisualTree to find the RadTimePicker control and set its culture.
Regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Michael
Top achievements
Rank 1
answered on 03 Aug 2012, 02:02 PM
Nice thanks...I created a property on the viewmodel and bound the culture to that