Skip to main content

Search and Top Navigation

#7702 open bug ()

Opened September 07, 2011 11:40AM UTC

Last modified June 24, 2014 11:14PM UTC

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:

Attachments (0)
Change History (6)

Changed October 11, 2012 02:43PM UTC by scottgonzalez comment:1

milestone: 1.9.01.11.0

Changed October 19, 2012 07:23PM UTC by mikesherov comment:2

status: newopen

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

Changed May 25, 2013 03:12AM UTC by annavester comment:3

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.

Changed May 25, 2013 10:28AM UTC by MikeH comment:4

_comment0: 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/) 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.1369477780188888
_comment1: 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/) 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.1369580125071137

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.

Changed June 01, 2013 04:13PM UTC by MikeH comment:5

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/).

Changed June 24, 2014 11:14PM UTC by scottgonzalez comment:6

milestone: 1.11.0none