"Refreshing" JQuery datepicker widget
<p>I want to refresh a datepicker widget. If a user presses for instance "button 1", the datepicker should have a certain set of properties, whereas if he presses "button 2" the datepicker should have a different set of properties. </p>

<p>How can i achieve this?</p>

<p>Some proof of concept code an be found here: <a href="http://jsfiddle.net/5zyLg/1/" rel="nofollow">http://jsfiddle.net/5zyLg/1/</a></p>

<pre><code>$("#booking_calendar").datepicker({ 
    autoSize: false, 
    dateFormat: 'dd/mm/yy',
    firstDay: 1,
    altField: "#date",
    altFormat: "yy-mm-dd",
    minDate: 0,
    maxDate: "2W"
 );

 // VIRTUAL CLICK EVENT GOES HERE

$("#booking_calendar").datepicker({ 
    autoSize: false, 
    dateFormat: 'dd/mm/yy',
    firstDay: 1,
    altField: "#date",
    altFormat: "yy-mm-dd",
    minDate: 0,
    maxDate: "3W"
 );
 $("#booking_calendar").datepicker("refresh");
</code></pre>

<p>^this is the general idea, although it does not work</p>
