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

    Hi,

    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



    lakmal
  2. Sebastian
    Admin
    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,
    Sebastian
    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

    Hi,

    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">

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

    </Calendar>

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

    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                                                    </telerik:RadDatePicker>



    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>
                                        </telerik:RadCalendar>



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

    Posted 15 Oct 2010 Link to this post

    Hi,

    I find link belou very helpfull:

    http://www.telerik.com/help/aspnet-ajax/calendar_pickersharedcalendars.html

    Thanks

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

    Posted 15 Oct 2010 Link to this post

    Lakmal,

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


    Hus,

    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.

    Thanks

    Oman
Back to Top