Skip to content

Instantly share code, notes, and snippets.

@jsteinshouer
Created July 21, 2016 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsteinshouer/dada251a5166c5240018ad96945e26ae to your computer and use it in GitHub Desktop.
Save jsteinshouer/dada251a5166c5240018ad96945e26ae to your computer and use it in GitHub Desktop.
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