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

Auto format manually entered date value

1 Answer 60 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
JSON
Top achievements
Rank 1
JSON asked on 09 Feb 2012, 03:07 PM
I have two RadDatePickers. Users enter unformatted date values manually, yet initially when they leave the date picker the dates remain unformatted. After retuning to the RadDatePicker and reentering the sam unformatted date and tabbing out of the control, the dates are auto-formatted. This is a result of posting back that does not initially occur, even with AutoPostBack enabled.

Thanks,

SteveO

 

<telerik:RadDatePicker ID="fDate"

 

 

runat="server"

 

 

AutoPostBack="true"

 

 

Width="150px"

 

 

MinDate="1960/1/2"

 

 

TabIndex="5" />

 

 

<DateInput ID="DateInput2"

 

 

runat="server"

 

 

DateFormat="MM/dd/yyyy">

 

 

</DateInput>

 

 

</telerik:RadDatePicker>

 

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 13 Feb 2012, 03:26 PM
JSON:

The code that you posted works as expected in IE9, FIreFox 10.0 and Chrome 16.0.912.77. My first attempt to format and tab returns properly formatted results. This even works the same after setting the AutoPostBack property to false, so I don't think a lack of postback is the issue.

Have you also tried adding the property:  displaydateformat="MM/dd/yyyy"? See Formatting Values documentation page for insights.

Can you post the entire code for the problematic form pictured in your attachment? This may help to identify the issue.

Cheers,
Tags
Ajax
Asked by
JSON
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or