"Date is out of range" error after calling set_maxDate

14 posts, 0 answers
  1. R
    R avatar
    5 posts
    Member since:
    Apr 2009

    Posted 27 May 2009 Link to this post

    I have two RadDatePickers.  When I select a date on the first one I need the MaxDate set to the selected date on the 2nd one.
    The following code sets the MaxDate correctly

    function dateSelected(sender, e) { 
       var dateString = e.get_newValue(); 
       var maxdate = new Date(dateString); 
       var postmarkdate = $find("<%= PostMarkDate.ClientID %>"); 
       postmarkdate.set_maxDate(maxdate); 

    My error occurs when I set the date on the 1st picker to any date less than the current month and then I click the icon to popup the calendar for the second picker.  Whenever I do this I get a javascript popup with the error: "Date is out of range."

    This occurs whether I type in the date or select one from the calendar.

    As I said this does not happen if I select a date that falls in the current month.

    This does not occur when I already have a date in the 2nd picker, only when it's empty.

    The MaxDate is set correctly in the 2nd picker and the 2nd picker calendar that pops up is displaying the correct dates, it just throws the js error.

    Whats the issue?

    Thanks,

    Rob T


  2. R
    R avatar
    5 posts
    Member since:
    Apr 2009

    Posted 29 May 2009 Link to this post

    Anyone?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 30 May 2009 Link to this post

    Hi Rob,

    Indeed, this proved to be a minor issue with the calendar control, that has already been fixed.

    Thank you for turning our attention to this behavior of the calendar control.

    Best Regards,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. R
    R avatar
    5 posts
    Member since:
    Apr 2009

    Posted 01 Jun 2009 Link to this post

    So does that mean You've now fixed the issue and it will be available in a future release or does that mean that you were aware of the issue, it has already been fixed, and the fix war put out in a previous release?

    Thanks,

    Rob
  6. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 02 Jun 2009 Link to this post

    Hi Rob,

    Based on your forum post, I researched the issue and upon reproducing it on my side I reported it to the development team and they fixed it right away.

    Best Regards,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 02 Jun 2009 Link to this post

    Hi Rob,

    Excuse me for having missed to point out that the fix should be available in the latest internal build version of the controls.

    Regards,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Rob T
    Rob T avatar
    44 posts
    Member since:
    Jul 2007

    Posted 02 Jun 2009 Link to this post

    Tsvetoslav

    Where can I get the fix?  When I navigate to the Latest Internal Build page I see a message:

    "No internal builds for RadControls for ASP.NET AJAX 2009.1 527 have been uploaded recently."

    Thanks

    Rob


  9. Rob T
    Rob T avatar
    44 posts
    Member since:
    Jul 2007

    Posted 04 Jun 2009 Link to this post

    Hello?  I'd really like to know where the fix is.
  10. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 05 Jun 2009 Link to this post

    Hello Rob T,

    The latest build is already available.

    Excuse us for the delay in uploading the build to the telerik site.

    All the best,
    Tsvetoslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Sachidananda
    Sachidananda avatar
    12 posts
    Member since:
    Jun 2011

    Posted 23 Aug 2011 Link to this post

    We are facing this problem with the latest calender control released in 2011. I have a calender control and has to set the raddatepicker.calender.RangeMinDate to 14 days in future.So this works fine if the date is 14 days ahead is within the same month but if it falls in the next month.Then it shows the Date is out of range error.

    How can I suppress this javascript alert.
  12. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 26 Aug 2011 Link to this post

    Hello Sachidananda,

    Based on the supplied information, it is hard to determine what is causing the unwanted behavior at your end. Could you please post your aspx markup code with the related code behind.
    Thus we will be able to gather more details about your scenario and provide you with more to-the-point answer.

    Looking forward for your reply.

    Best wishes,
    Radoslav
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  13. Ashwini
    Ashwini avatar
    3 posts
    Member since:
    May 2013

    Posted 25 Jul 2013 Link to this post

    I am still facing this issue (telerik version - 2011.1.614.35).

    I have two RadDatePicker controls radDate1 and radDate2. The min and max dates of both these controls are set when the page is initialized, and they are same i.e. "radDate1's MinDate = radDate2's MinDate = varMinDate". Similarly, MaxDate is same for both controls. When the user changes the date in radDate1, the selectedDate and maxDate of radDate2 are set to the selected date of radDate1. This is done because the date in radDate2 must never exceed the date in radDate1. All this works fine except for one scenario - when user selects the date in radDate1 same as that of MinDate. E.g.,

    1. The MinDate of both controls is July 1, 2013. MaxDate can be anything, it doesn't matter for now.
    2. User changes the date of radDate1 to July 1, 2013.
    3. The  javascript code sets the selectedDate and maxDate of radDate2 to July 1, 2013, and gives an alert message 'Date is out of range'.

    Please note, here the MaxDate of radDate1 is also equal to its MinDate. But it works properly as user had manually set the date. Where as, for radDate2, the maxDate is being set through js code (using set_maxDate()), which gives the error.

    For now, for this particular scenario, I have fixed this issue by setting the minDate of radDate2 to 1day prior, then set its maxDate and then again reset the minDate to what it was. But, I am really not fond of such hacks. Is there a better recommendation? Is this a bug in the telerik control?

    Note - I have also tried clearing the selectedDate of radDate2 before setting its max_date, just to check if it has something to do with the error. But in vain.

  14. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 29 Jul 2013 Link to this post

    Hello Ashwini,

    I verified that the described issue exists into the current version of our controls. However our developers fixed it and the fix will be available into the next internal build. On the following link you could find instructions how to use the hotfix dlls:
    http://www.telerik.com/help/aspnet-ajax/introduction-using-hotfix.html

    Please excuse us for the temporary inconvenience.

    Regards,
    Radoslav
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  15. Ashwini
    Ashwini avatar
    3 posts
    Member since:
    May 2013

    Posted 29 Jul 2013 Link to this post

    Thank you.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017