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
13 Answers, 1 is accepted
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.
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.
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.
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
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.
How can I suppress this javascript alert.
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 >>
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.
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