I want to set the 2nd date picker value regarding first value in jquery UI date picker
<p>if have two date picker 1 for checkin date and other for checkout i want if i select 28-06-2012 in checkin it autmatic disable dates befor 29-06-2012 in checkout date picker 
Here's the code </p>

<pre><code>$(document).ready(function () {
    function getDateYymmdd(value) {
        if (value == null)
            return null;
        return $.datepicker.parseDate("yy-mm-dd", value);
    }

    $('.date').datepicker({ minDate: 1, dateFormat: "dd-mm-yy" });

    $('.date').each(function () {
        var minDdate = getDateYymmdd($(this).data(""));
        var maxDate = getDateYymmdd($(this).data("val-rangedate-max"));
        $(this).datepicker({

            maxDate: maxDate
        });
    });
    });
</code></pre>

<p></p>
