I need to call $.datepicker._gotoToday; from my own button.
I’m adding the custom button in this way:
beforeShow: function (input) {
setTimeout(function () {
var bodyPane = $(input).datepicker("widget");
$("<button>", {
click: function () {
// call $.datepicker._gotoToday;
}
}).attr("class", "btnToday").text("test").appendTo(bodyPane);
}, 1);
}
Is there a way to call the function or “clone” it?
You should be able to just set the date for the picker in the click function: