RadDatePicker error.

3 posts, 0 answers
  1. Guruvu
    Guruvu avatar
    32 posts
    Member since:
    Sep 2010

    Posted 12 Jul 2011 Link to this post

    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. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 12 Jul 2011 Link to this post

    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!

  3. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 12 Jul 2011 Link to this post

    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!

Back to Top