I am using [kelvin lucks jquery date picker](http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/).

I have a start and end date picker set up so that when the start date is selected it assigns that same date to the end date and the end date insures that its calendar does not allow selecting of any dates before the start date. 

Works great except if you select the end date without touching the start date you are able to set an end date before the start date. Not good!

```
$(function()
{
    $('.date-pick').datePicker({startDate:'2000-01-01', clickInput:true})

        $('#start-date').bind('dpClosed', function(e, selectedDates) {
                var d = selectedDates[0];
                if (d) {
            d = new Date(d);
            $('#end-date').dpSetStartDate(d.addDays(0).asString()).dpSetSelected(d.asString()).val($(this).val());
        }
    });
});

```

Because I am prefilling the input fields using PHP, all I want to do is trigger `$('#end-date').dpSetStartDate` so that the end date updates when the document loads. At the moment it only updates on `$('#start-date').bind('dpClosed', function(e, selectedDates) {`

How do I do this?

Thanks,

Tim