1) You need one that is used to redirect the page. You can customize how the window opens. window.location.href
2) After selecting a date in datepicker ( onSelect), you can combine the event changeas @TJ Crowder said in his answer.
You can try like this
$("#datepicker")
.datepicker({
dateFormat: "yy-mm-dd",
onSelect: function(dateText) {
$(this).change();
}
})
.change(function() {
window.location.href = "index.php?date=" + this.value;
});
source
share