Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery ui datepicker go to today button

i need my calendar to go to the current date when [today] button is clicked, so that the user can get to the current day when browsing my calendar.

for example the current month is feb 2013 and the user is browsing on the dec 2015 page of the calendar when he clicks the [today] button it will automatically return to the current days page of the calendar which is feb 2013.

i'am using

jquery-ui-datepicker.min.js

as a plugin for my calendar

like image 752
telexper Avatar asked Feb 18 '23 12:02

telexper


1 Answers

The jQuery UI Datepicker has functionality built into it for this.

See this: http://jqueryui.com/datepicker/#buttonbar

$(function() {
    $( "#datepicker" ).datepicker({
        showButtonPanel: true
    });
});
like image 138
Scott Avatar answered Feb 20 '23 09:02

Scott