Opened 11 years ago

Last modified 9 years ago

#7702 open bug

css class ui-state-disabled not applied after refresh when inline

Reported by: MikeH Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:


The css class ui-state-disabled is applied on div.ui-datepicker-header and div.ui-datepicker-calendar when calling the method disable on an inline datepicker.

After a call to the refresh method, the datepicker is still disabled (impossible to select a date) but the css class ui-state-disabled is absent.

Tested on firefox 6.0.1, Windows 7 Professional.

Example on jsfiddle:

Change History (6)

comment:1 Changed 10 years ago by Scott González


comment:2 Changed 10 years ago by mikesherov

Status: newopen

still valid on latest:

comment:3 Changed 10 years ago by annavester

Correct me if I'm wrong, but I believe that "refresh" method doesn't reinitialize the datepicker. In your case I think you would have to enable it before the refresh method to be able to pick a date again - Also in this case it doesn't matter if datepicker is inline or not.

comment:4 Changed 10 years ago by MikeH

Actually, the problem is only about the CSS class. I think the behavior of "refresh" and "disable" is correct as you showed in your example. I updated the originals examples ( and by adding a call to "isDisabled" to demonstrate the problem more clearly. When the datepicker is disabled and you refresh it, it stays disabled, as expected, but the CSS class ui-state-disabled isn't applied so it looks enabled.

Last edited 10 years ago by MikeH (previous) (diff)

comment:5 Changed 10 years ago by MikeH

After taking a look at the code, it appears there is a similar issue when the datepicker is created with the "changeMonth" and "changeYear" options. After a call to "refresh" on an inline datepicker, the selects are re-enabled (ex:

comment:6 Changed 9 years ago by Scott González

Milestone: 1.11.0none
Note: See TracTickets for help on using tickets.