views:

251

answers:

1

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?

+1  A: 

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.

najmeddine
OK that makes sense. How can I stop "today" being highlighted?
Andrew Davey
@Andrew - you should be able to just remove the CSS class for the current day
Russ Cam
Thanks for the answer. However I'm using the Google hosted JQuery libraries - so modification of the script is not an option. I guess I should file a feature request with JQuery UI.
Andrew Davey