Does anyone know if it is possible to use the jQuery UI Datepicker, and when clicking on a date, set the document.location to that date, appended to a preset URL?
So, if I clicked on one of the dates, it might direct me to:
http://www.mysite.com?date=2009-10-25
I need to just use this as a quick way to quickly navigate my website calendar.
Ideas?
Just give it an onSelect
function to call.
I did small example, it works for me just change date format :)
$().ready(function(){
$('#datepicker').click(function(){
window.location.replace("http://www.mysite.com/?date=" + $('#datepicker').val());
});
});
I assume you download datapicker from Jqueryui.com with examples so you can get choosen date from calendar with:
$('#datepicker').val()
so paste it in onclick()
function or onchane()
function