This is a migrated thread and some comments may be shown as answers.

Max and min date error in date picker

4 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
lakmal
Top achievements
Rank 2
lakmal asked on 11 Oct 2010, 04:50 AM
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

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 11 Oct 2010, 12:13 PM
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
0
lakmal
Top achievements
Rank 2
answered on 12 Oct 2010, 04:57 AM
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>



0
Hus Damen
Top achievements
Rank 1
answered on 15 Oct 2010, 09:20 AM
Hi,

I find link belou very helpfull:

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

Thanks

Hus
0
O'Man
Top achievements
Rank 1
answered on 15 Oct 2010, 09:26 AM
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
Tags
General Discussions
Asked by
lakmal
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
lakmal
Top achievements
Rank 2
Hus Damen
Top achievements
Rank 1
O'Man
Top achievements
Rank 1
Share this question
or