Alex,

I have set my input fields to readonly even before applying the
datepicker code and that seems to work.  Not sure if that will meet
your needs though.  I like the readonly look because it still looks to
the user like it can be clicked into, then the click opens the
datepicker.

<input id="dp" type="text" readonly="readonly" />

Hth,

Dave


On Sep 21, 1:30 pm, Alex Savitsky <[email protected]> wrote:
> Dave,
>
> Thanks for the suggestion, but this didn't work :(
>
> The first variant has the same problem as the original one - the
> picker doesn't close (actually, it doesn't close on date selection,
> either, I was incorrect in first post)
>
> The second one doesn't disable the input field, at least not on IE
> (though the picker closes in this case).
>
> It must be something that's related specifically to the disabled state
> that triggers this bug, I'm still looking through the UI code...
>
> Regards,
>
> Alex
>
> On Sep 21, 1:21 pm, Fontzter <[email protected]> wrote:
>
> > Maybe try this:
>
> > beforeShow: function(input) {$(input).attr("disabled","disabled");},
> > onClose: function(dateText, inst) {$(this).removeAttr("disabled");}
>
> > or alternately:
>
> > beforeShow: function(input) {$(input).attr("readonly","readonly");},
> > onClose: function(dateText, inst) {$(this).removeAttr("readonly");}
>
> > Hth,
>
> > Dave
>
> > On Sep 21, 11:58 am, Alex Savitsky <[email protected]> wrote:
>
> > > Hi,
>
> > > I've ran into what I believe is a bug with datepicker, and decided to
> > > run it by the list before putting it in the bug tracker.
>
> > > We're in a process of adopting jQuery UI (v.1.7.2) for our site, and
> > > one of the requirements for the datepicker is to be able to disable
> > > the input field once the picker is opened, and re-enable it back when
> > > the picker is closed. The following picker event handlers accomplish
> > > that on Firefox:
>
> > > beforeShow: function(input) {input.disabled = true;},
> > > onClose: function(dateText, inst) {this.disabled = false;}
>
> > > However, in IE8, the picker always stays on the screen once opened -
> > > the onClose handler never executes (that includes closing it with the
> > > "Done" button), unless a new date is picked (so that it's not possible
> > > to cancel the date selection). Removing the event handlers makes the
> > > picker to work normally again.
>
> > > Is this a bug?
>
> > > Thanks,
>
> > > Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to