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

RadDatePicker custom input format

1 Answer 90 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Ziga HABJAN
Top achievements
Rank 1
Ziga HABJAN asked on 10 Jun 2013, 11:28 AM
Hi, is it possible to config RadDatePicker to accept dates without dots:
User would like to enter "31012013" in textbox (of RadDatePicker), that would be converted to datetime. (re-format to "31.01.2013" on blur is acceptable, but how to do it?) 

re, Žiga

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 10 Jun 2013, 12:05 PM
Hi,
Try this following code:

ASPX:
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"  >
  <DateInput ToolTip="Date input" runat="server" >
    <ClientEvents OnValueChanged="ValueChanged" />
  </DateInput>
</telerik:RadDatePicker>

JS:
function ValueChanged(sender, args)
 {
 sender.set_textBoxValue(args.get_newDate().format("MM.dd.yyyy"));
 }

Thanks
Princy
Tags
Calendar
Asked by
Ziga HABJAN
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or