Opened 8 years ago

Last modified 5 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:

Description

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 6 years ago by Scott González

Milestone: 1.9.01.11.0

comment:2 Changed 6 years ago by mikesherov

Status: newopen

still valid on latest: http://jsfiddle.net/cM77u/

comment:3 Changed 6 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 - http://jsfiddle.net/DMs2j/5/ Also in this case it doesn't matter if datepicker is inline or not.

comment:4 Changed 6 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 (http://jsfiddle.net/DMs2j/6/ and http://jsfiddle.net/cM77u/3/) 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 6 years ago by MikeH (previous) (diff)

comment:5 Changed 6 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: http://jsfiddle.net/HqkgF/2/).

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

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