Hi all,
I'm using a datepicker that I want to be always shown on my page. On selecting a date, I want the users browser to immediately load a new page based on the selected date.
I have everything working fine, other than when the user selects a date, the datepicker disappears while the new page is loading, but I want it to just stay visible.
My xhtml:
My jquery code:
- <div id="additional_whats-on-when" class="section">
- <div class="headerOne">
- <h2>What's on when</h2>
- </div>
- <div id="whats-on-when-calendar-box">
- </div>
- </div>
Interestingly, if I change my onSelect function to:
$().ready(function() {$("#whats-on-when-calendar-box").datepicker({firstDay:1,minDate:"-0d",maxDate:"+1y",dateFormat:'yy/mm/dd',onSelect:function(dateText,inst) { window.location.href = "/whatson/when/"+dateText+"/"},});});
My datepicker stays visible when the alert box shows and once I click ok and the alert box disappears.
- onSelect:function(dateText,inst) { alert("Test"); return true; }