Date Error

3 posts, 1 answers
  1. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 21 Sep 2010 Link to this post


    Hi ,

    i am using RadDatePicker control and i am getting below error...

    Value of '1900-01-01 00:00:00' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
    Parameter name: SelectedDate

    while the date is in table is 1900-01-01.

    <telerik:RadDatePicker runat="server" DbSelectedDate='<%# Bind("StartDate") %>' 
                                        ID="txtStartDate" style="z-index: 109; left: 90px; position: absolute; 
                                        top: 180px" Width="220px" Skin="Office2007"> 
                                        <DateInput ID="DateInput1" runat="server" DateFormat="yyyy-MM-dd"
                                            ReadOnly="true" Font-Names="Tahoma" Font-Size="12px"></DateInput> 
                            </telerik:RadDatePicker>

    waiting for your reply.

    Please help.





  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 22 Sep 2010 Link to this post

    Hello,

    By default the MinDate for RadDAtePicker is "1/1/1980 12:00:00 AM". So, you need to set lower date value than the actual value populates in datepicker.

    Set the MinDate for the RadDatePicker as shown below.
                <telerik:RadDatePicker ID="RadDatePicker2" runat="server" MinDate="01/01/1800">
                </telerik:RadDatePicker>

    -Shinu.
  3. bharat kumar
    bharat kumar avatar
    53 posts
    Member since:
    Jan 2010

    Posted 22 Sep 2010 Link to this post

    Dear Shinu,

    thanks for your reply. the problem resolved.
Back to Top