How to update the minDate value of jQuery DatePicker?
===

I have the following function to set the default value of minDate:

    $(function() {
	$( "#arrival_date" ).datepicker();
	$( "#arrival_date" ).datepicker('option','minDate','<?php echo $checkin ?>');    	
    });

But after the page load the $checkin variable sometimes change based on the earliest date in some of my function.

Example if the value of $checkin is "7/29/2012" and after the page is fully loaded sometimes the $checkin date changes to earlier than "7/29/2012". Say it will change to "7/20/2012".

If this happens I want to change the minDate value of DatePicker to the new date (i.e. "7/20/2012" instead of "7/29/2012").

How to call this function?