Datepicker Open external link
Forgive me if this has been answered, but I am unable to find it in the forums.
I have set up an inline datepicker with the intention of the selected date displaying an events page based on the selection. Something like http://hhw.me/index.php?date=2010/04/01
I found an example (http://www.devcomments.com/Add-links-to-jQuery-UI-Datepicker-to197750.htm), but I am having trouble with it, the code returns and undefined error, and redirects to http://hhw.me/undefined
Any help is greatly appreciated.
- <script type="text/javascript">
$(function() {
$("#datepicker").datepicker({minDate: 0, maxDate: '+60M +10D',onSelect: pickDate});
});
function pickDate(dateStr) {
// Do something with the chosen date...
window.location = "http://www.hhw.me/index2.php?date=".dateStr;
}