2009/12/7 Mestek Webmaster <[email protected]>:
> I just realized that if no date is selected it will crash, so you'll
> want to change the onClose function to this:
>
>
> onClose: function()
> {
> if(
> $("#fromDate").datepicker('getDate') != null )
> {
> var day =
> $("#fromDate").datepicker('getDate');
>
> day.setDate(day.getDate()+1);
>
> $("#toDate").datepicker('option', 'minDate', day );
> }
> }
>
>
> On Dec 7, 8:40 pm, Mestek Webmaster <[email protected]> wrote:
>> I'm doing the same thing using UI 1.7.2 with JQuery 1.3.2
>>
>> This code works for me:
>>
>> <script type="text/javascript" defer="defer">
>> $(document).ready
>> (
>> function()
>> {
>> $('#fromDate').datepicker(
>> {
>> showAnim:'slideDown',
>> onClose: function()
>> {
>> var day =
>> $('#fromDate').datepicker('getDate');
>>
>> day.setDate(day.getDate()+1);
>>
>> $('#toDate').datepicker('option', 'minDate', day );
>> }
>> }
>> );
>> $('#toDate').datepicker(
>> {showAnim:'slideDown'} );
>> }
>> );
>> </script>
>>
It's amazingly complicated for something that used to be written as:
$(function(){
$("#range").datepicker({ rangeSelect: true });
});
It works in jQuery UI 1.6, doesn't work in 1.7.
Does anyone know why?
Rafał Pocztarski
--
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en.