Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom response from JQuery UI DatePicker

I would like to add a button to a JQuery DatePicker that would give a customized response (that is not a date). My situation is a form asking previous work experience, and I want a Present button with the DatePicker on the employment_date_end field.

like image 870
Andrew Jackman Avatar asked Nov 13 '22 20:11

Andrew Jackman


1 Answers

$("<button>Present</button>").appendTo($('<div class="ui-datepicker-buttonpane ui-widget-content" />').appendTo(".ui-datepicker")).button()

this script adds the button to date picker when shown u can call this script on events like on show event of date picker.To try it just open firebug open datepicker popup and execute the script in firebug console and the button will be added its just a simple fix that i m giving .there are many other ways like extending datePicker

like image 199
Vikrant Mahajan Avatar answered Jan 09 '23 18:01

Vikrant Mahajan