Max and min date error in date picker

5 posts, 0 answers
  1. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 10 Oct 2010 Link to this post


    When my db fileds are Null this error has came, Why that

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

  2. Sebastian
    Sebastian avatar
    9934 posts

    Posted 11 Oct 2010 Link to this post

    Hello lakmal,

    Can you verify that you bind the DbSelectedDate property of the date picker instead of its SelectedDate property? Thus dbnull values from your database should be handled without issues.

    Best regards,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 11 Oct 2010 Link to this post


    I using  DbSelectedDate, When i save empty date its gone mindate  to database. I having use shared calendar like below, Is that the problem?

     <telerik:RadDatePicker ID="dtpDocStart"   Culture="en-GB"    
                                                        SharedCalendarID="sharedCalendar"  Width="100px"    runat="server" 
                                                        CssClass="RadInput_Default" MaxDate="" MinDate="">

    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">

                      <telerik:RadCalendarDay Repeatable="Today" > 
                         <ItemStyle BackColor="Pink" /> 


    <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>

    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>

    my share calendar is   
    <telerik:RadCalendar ID="sharedCalendar" Runat="server" Visible="False">
    <DayOverStyle CssClass="rcHover"></DayOverStyle>

    <FastNavigationStyle CssClass="RadCalendarMonthView RadCalendarMonthView_Default"></FastNavigationStyle>

    <DisabledDayStyle CssClass="rcDisabled"></DisabledDayStyle>

    <WeekendDayStyle CssClass="rcWeekend"></WeekendDayStyle>

    <ViewSelectorStyle CssClass="rcViewSel"></ViewSelectorStyle>

    <SelectedDayStyle CssClass="rcSelected"></SelectedDayStyle>

    <CalendarTableStyle CssClass="rcMainTable"></CalendarTableStyle>

    <OtherMonthDayStyle CssClass="rcOtherMonth"></OtherMonthDayStyle>

    <OutOfRangeDayStyle CssClass="rcOutOfRange"></OutOfRangeDayStyle>

  4. Hus Damen
    Hus Damen avatar
    33 posts
    Member since:
    Dec 2009

    Posted 15 Oct 2010 Link to this post


    I find link belou very helpfull:


  5. O'Man
    O'Man avatar
    34 posts
    Member since:
    Oct 2009

    Posted 15 Oct 2010 Link to this post


    My 5 diopter glasses could't find the DbSelectedDate in your code. Maybe I need to upgrade to 6.


    Thanks for the link. I was doing the mistake to set the Visible="false" for the shared calendar. Now I have corrected it and its work like a rifle.


Back to Top