Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Override Today button in Jquery UI Datepicker
$.datepicker._gotoToday = function(id) {
var target = $(id);
var inst = this._getInst(target[0]);
var date = new Date();
this._setDate(inst,date);
this._hideDatepicker();
}
$('.dp').datepicker({
showButtonPanel: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment