convert date issue with raddatepicker

4 posts, 0 answers
  1. Tam
    Tam avatar
    2 posts
    Member since:
    Jan 2012

    Posted 16 Jan 2012 Link to this post

     

    Hi
    I have a problem with convert date in raddatepicker.
    <rad:RadDatePicker ID="RadDatePicker1" runat="server"  
        DateInput-DisplayDateFormat="dd-MM-yyyy" 
        DateInput-DateFormat="dd-MM-yyyy"
    </rad:RadDatePicker> 

     

    When I input 1911-01-12  (12th Jan 1911), after hitting the tab key, it has translated into 01-12-1911 (1st Dec 1911).

    Is there any way I can make the date picker convert the date correctly?
    Thanks

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Jan 2012 Link to this post

    Hello Tam,

    Check out the following documentation.
    Date Format Patterns.

    Thanks,
    Princy.
  3. Tam
    Tam avatar
    2 posts
    Member since:
    Jan 2012

    Posted 17 Jan 2012 Link to this post

    Hello Princy,

    I inputed date format correctly. I have a problem with auto convert of rad date picker. When I input 1911-01-12   (it's mean 12th Jan 1911), it auto cinverted to 01-12-1911  (1st Dec 1911).

    How I can fix it to convert correct?
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Jan 2012 Link to this post

    Hello,

    Try setting DateFormat as shown.

    ASPX:
    <telerik:RadDatePicker ID="RadDatePicker1" runat="server" DateInput-DateInput-DisplayDateFormat="yyyy-MM-dd" DateInput-DateFormat="yyyy-MM-dd">
    </telerik:RadDatePicker>

    Thanks,
    Princy.
Back to Top