Entering times into the control such as
5a
510a
510am
5:10am
6pm
610pm
6:10pm
13:20
13
all work and get populated as the correct time. However
6p
610p
6:10p
do not. Is there any way to make this work or any reason it wasn't supported. If 'a' works I would expect 'p' to also work
3 Answers, 1 is accepted
0
Vasil
Telerik team
answered on 12 Jun 2012, 10:06 AM
Hello David,
"5a" works as "5am" not because "a" is considered as "am" , but because by default the "5:00" is "5 AM".
The same way "5z" will be considered as 5 AM, and "5sometext" will be considered as "5 AM"
To get PM you have to provide correct text that to be parsed in PM, otherwise the parsing will consider it as 5:00 which is AM.
Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Is there a way to extend the control to make this work?
0
Accepted
Vasil
Telerik team
answered on 15 Jun 2012, 11:25 AM
Hello David,
You can handle the onValueChanging event, parse the date yourself and use the set_newValue() to set the value in correct format. Simplest solution will be to check if the last char is "p" and to add 'm' in this case. You are free to write more complex logic in order to parse more specific strings as well.
Greetings,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.