Hi,
I am using 'RadControls for ASPNet AJAX Q2 2008'.
I have a RadDateInput control in my form as follows:
<TelerikWeb:RadDateInput ID="tbxTicketDate" runat="server" Width="150" |
ToolTip="Date of Ticket" Skin="Vista" DateFormat="M/d/yyyy h:mm tt" |
DisplayDateFormat="M/d/yyyy h:mm tt" MaxDate="2050-01-01" |
MinDate="2007-05-09" TabIndex="70" SelectionOnFocus="SelectAll" /> |
The field converts information in the following manner:
Input “082308 1000p” Becomes: “08/23/2008 10:00 AM”
Input “080908 1245p” Becomes: “08/09/2008 12:45 AM”
It is not considering my a/p designator, always taking as 24 hour format.
I want the following results on my control:
Input “082308 1045a” Convert to “08/23/2008 10:45 AM”
Input “090808 0355p” Convert to “09/08/08 3:55 PM”
I would appreciate any help I can get with this.
-Vishal
6 Answers, 1 is accepted
0
Hello Vanitha,
You can modify the way RadDateInput interprets the entered data as shown below:
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can modify the way RadDateInput interprets the entered data as shown below:
<script language="javascript" type="text/javascript"> |
function ValueChanging(sender, eventArgs) |
{ |
var value = eventArgs.get_newValue(); |
//modify the string to comply with your requirements |
eventArgs.set_newValue(value); |
} |
</script> |
<telerik:RadDateInput ID="tbxTicketDate" runat="server" Width="150" ToolTip="Date of Ticket" |
Skin="Vista" DateFormat="M/d/yyyy h:mm tt" DisplayDateFormat="M/d/yyyy h:mm tt" |
MaxDate="2050-01-01" MinDate="2007-05-09" TabIndex="70" SelectionOnFocus="SelectAll" |
ClientEvents-OnValueChanging="ValueChanging" /> |
Kind regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Vanitha
Top achievements
Rank 1
answered on 26 Sep 2008, 02:56 PM
Hello Daniel,
Thanks for your immediate response.
Your suggestion doesn't work for me. Still it is considering as 24 hour format.
-Vishal
Thanks for your immediate response.
Your suggestion doesn't work for me. Still it is considering as 24 hour format.
-Vishal
0

Shane Milton
Top achievements
Rank 2
answered on 26 Sep 2008, 05:47 PM
I work with Vanitha and have looked at what she's doing. It's not a simple case of "p" being interpreted correctly. This example may explain more of the problem she's encountering:$0$0$0$0If we input: "09082008 315 pm", it gets converted into "9/8/2008 3:15 AM". For some reason, it is completely neglecting the "pm" portion of this although it seems to be a very valid and obvious input.$0$0$0$0$0-Shane$0
0
Hi,
To see more information on the requested functionality, please refer to the following article:
Formatting Dates
Sincerely yours,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
To see more information on the requested functionality, please refer to the following article:
Formatting Dates
Sincerely yours,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Vanitha
Top achievements
Rank 1
answered on 29 Sep 2008, 12:59 PM
Hi,
I did refered to this article before starting my discussion thread. Format pattern is not working as displayed in this article, i.e "M/d/yyyy h:mm tt"
Please post sample application which satisfies my requirement.
-Vishal
0
Hello Vanitha,
We have addressed your question in the support ticket you have opened on the same topic.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
We have addressed your question in the support ticket you have opened on the same topic.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.