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

RadDatePicker error.

2 Answers 68 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Guruvu
Top achievements
Rank 1
Guruvu asked on 12 Jul 2011, 10:51 AM
Hi,

In my applicationn i had a RadDatePicker with the following syntax:

<telerik:RadDatePicker ID="txtDate" Runat="server" Skin="Sunset" 
                 FocusedDate="" MinDate="01/01/2006" ShowPopupOnFocus="True" TabIndex="20" 
                 Width="155px" MaxDate="01/01/2020">
                    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" 
                                         ViewSelectorText="x" Skin="Sunset"></Calendar>
                                       <DatePopupButton ImageUrl="" HoverImageUrl="" TabIndex="20"></DatePopupButton>
                    <DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="MM/dd/yyyy" TabIndex="20"></DateInput>
             </telerik:RadDatePicker>

My requirement is i need to bind 10 days back date from today's date to RadDatePicker with the following syntax:

txtDate.SelectedDate =DateTime.Now.Date.AddDays(-10);

Here i am getting the following error:

Value of '7/2/2011 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
Parameter name: SelectedDate

Any one please suggest me the solution for this?

Thanks in advance...

2 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 12 Jul 2011, 04:37 PM
Hello Guruvu,

Please find attached a small runnable application which works correctly on my side. Test it locally and verify what the difference in your case is.

Kind regards,
Maria Ilieva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Maria Ilieva
Telerik team
answered on 12 Jul 2011, 04:37 PM
Hello Guruvu,

Please find attached a small runnable application which works correctly on my side. Test it locally and verify what the difference in your case is.

Kind regards,
Maria Ilieva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Calendar
Asked by
Guruvu
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or