This would be a good start:

http://groups.google.com/group/jquery-ui/browse_thread/thread/2a8b9ff3a84221c0

You'll just have to modify that to add 3 days.

- Richard

On Mon, Dec 21, 2009 at 4:56 PM, Aljaz <aljaz.zu...@gmail.com> wrote:

> Hello,
>
> Hope someone can help me.. I am still new to jquery and i like to ask
> and learn :). Well i need help with datepicker. I have 2 inputs witch
> both triger datepicker. I need the "date from" value from the first
> datepicker and insert it to "date to" into the minDate. I need to do a
> minimal reservation days and would like to simply solve it with
> jquery. So for example "date from" is picked 1/1/2010 and i need 3
> days minimal reservation, so if 1/1/2010 was picked i need the value
> of it and combine it with the minDate in "date to" so the minDate for
> "date to" would be 10/1/2010, another example : if "date from" is
> picked 10/1/2010 then "date to" minDate should be 13/1/2010. Please
> help !
>
> Here is the code:
>
> /* Function  date from */
> $(function() {
> $('#startdate').datepicker({
> minDate: 0,
> dateFormat: 'dd-mm-yy',
> changeMonth: true,
> changeYear: true
> });
>
> /* Function date to */
> $('#enddate').datepicker({
> minDate:  3,  <------------------------------ here should be something
> like:     minDate: 3+ $datefrom,
> dateFormat: 'dd-mm-yy',
> changeMonth: true,
> changeYear: true
> });
>
> <input id='startdate' name='start' size='15'/>
> <input id='enddate' size='15' name='end'/>
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "jQuery UI" group.
> To post to this group, send email to jquery...@googlegroups.com.
> To unsubscribe from this group, send email to
> jquery-ui+unsubscr...@googlegroups.com<jquery-ui%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/jquery-ui?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.


Reply via email to