Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3128 closed bug (wontfix)

Disabled Datepicker still pops up when buttonImage clicked in IE7 and cannot be closed

Reported by: jstayton Owned by: grabanski
Priority: major Milestone:
Component: ui.datepicker Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

Description

Example: http://www.justinstayton.com/datepickerTest.html

When you click on the buttonImage, the Datepicker pops up and throws a JS error about not being able to move focus to a disabled control. There is no way to close the Datepicker.

This behavior seen in IE7.

I'm not sure what the best solution is: hiding the buttonImage, or disabling the buttonImage, or graying it out, etc..

Change History (2)

comment:1 Changed 11 years ago by kbwood

Resolution: wontfix
Status: newclosed

Use $('selector').datepicker('disable') to properly disable the datepicker, and $('selector').datepicker('enable') if you want to re-enable it.

comment:2 Changed 11 years ago by jstayton

Thanks for your reply, kbwood.

I understand the purpose of the 'disable' and 'enable' options, but it also makes a lot of sense to me that the Datepicker is automatically set to 'disable' when it's attached to an already disabled input field.

For example, I have a good amount of PHP code that outputs disabled input fields when the page is loaded. Are you saying that I should attach the Datepicker to the input fields and then immediately check to see if they're disabled, and if they are, disable the Datepickers I just attached?

I could very likely be missing something here :)

Note: See TracTickets for help on using tickets.