Auto format manually entered date value

2 posts, 0 answers
  1. JSON
    JSON avatar
    78 posts
    Member since:
    Mar 2010

    Posted 09 Feb 2012 Link to this post

    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>

     

  2. Richard
    Richard avatar
    479 posts
    Member since:
    Nov 2011

    Posted 13 Feb 2012 Link to this post

    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,
Back to Top