Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JQuery UI datepicker gotoCurrent does not work

I don't want the "today" highlighting displayed on my JQuery UI datepicker. The gotoCurrent option is meant to make the highlighting move to the selected date. This would be fine. However setting gotoCurrent to true has no effect. What am I doing wrong?

like image 704
Andrew Davey Avatar asked Sep 09 '09 10:09

Andrew Davey


1 Answers

the gotoCurrent controls the behavior of 'Today' button in the ButtonPanel.

select a date != today's date, click this button:

if gotoCurrent = false -> today's date is shown
if gotoCurrent = true -> selected date is shown

to disable Today's highlighting: in the file ui.datepicker.js:

search for :

 (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +

and delete the highlight class (or delete the whole line) :

 (printDate.getTime() == today.getTime() ? '' : '') +

you should get what you want.

like image 83
manji Avatar answered Oct 17 '22 22:10

manji