Seems like you might also want to make that symmetrical too, something like:
$(document).ready(function() {
       $("#arrive").datepicker({
                 minDate: new Date(2009, 11 - 1, 6),
                 onSelect: function(dateText, inst)
                              {    $("#depart').datepicker("option",
"minDate", new Date(dateText));  }
        });
       $('#depart').datepicker({
          onSelect: function(dateText, inst)
              {    $("#arrive').datepicker("option",
"maxDate", new Date(dateText));  }
       });
       $('#calendar-trigger-arrive').click(function() {
        $('#arrive').datepicker('show');
       });
      });

No?

Stuart.

On Tue, Jul 28, 2009 at 14:16, James Curran<[email protected]> wrote:
>
> $(document).ready(function() {
>        $("#arrive").datepicker({
>                  minDate: new Date(2009, 11 - 1, 6),
>                  onSelect: function(dateText, inst)
>                               {    $("#depart').datepicker("option",
> "minDate", new Date(dateText));  }
>         });
>        $('#arrive').datepicker();
>        $('#calendar-trigger-arrive').click(function() {
>         $('#arrive').datepicker('show');
>        });
>       });
>
> On Tue, Jul 28, 2009 at 2:09 PM, Yvan<[email protected]> wrote:
>>
>> I'm unsure about specifically where within my script I'd need to add
>> the function you've provided.  My script is as follows:
>>
>>        <script type="text/javascript">
>>        $(document).ready(function() {
>>         // $('#arrive').datepicker({dateFormat: 'dd-M-yy'});
>>         $("#arrive").datepicker({minDate: new Date(2009, 11 - 1, 6),});
>>         $('#arrive').datepicker();
>>         $('#calendar-trigger-arrive').click(function() {
>>          $('#arrive').datepicker('show');
>>         });
>>        });
>>        </script>
>>
>> Please advise.
>>
>> Thanks,
>> - yg
>>
>>
>>
>> On Jul 28, 1:56 pm, James Curran <[email protected]> wrote:
>>> Well, this is untested, but it seems right......
>>>
>>> $('#dateArrive').datepicker({onSelect: function(dateText, inst)
>>>   {
>>>     $("#dateDepart').datepicker("option", "minDate", new Date(dateText));
>>>   })
>>>
>>>
>>>
>>> });
>>> On Tue, Jul 28, 2009 at 1:35 PM, Yvan<[email protected]> wrote:
>>>
>>> > I have 2 jquery-based datepickers on a site that I'm developing
>>> > (lefthand column - quick reservation form)
>>>
>>> >http://www.theseagatehotel.com/www.theseagatehotel.com/index.html
>>>
>>> > Is there any way that I can update the datepickers so that when you
>>> > choose an "Arrive" date, .... the first choosable "Depart" date would
>>> > be automatically updated to be 1 day after the chosen "arrive" date?
>>>
>>> > For example, .. if I was to choose November 6th from the "Arrive"
>>> > datepicker, .. the first choosable date in the "Depart" datepicker
>>> > should be dynamically set to November 7th, .. and all dates before
>>> > November 7th in that "Depart" datepicker should be grayed out and un-
>>> > clickable.
>>>
>>> > How would I accomplish something like this?  Is it even technically
>>> > possible?
>>>
>>> > Thanks,
>>> > - Yvan
>>>
>>> --
>>> Truth,
>>>     James
>> >
>>
>
>
>
> --
> Truth,
>    James
>
> >
>



-- 
http://sab39.netreach.com/

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to