-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting input as readonly breaks showOn "click" #425
Comments
Setting the input to readonly disables timepicker completely. This is deliberate. Perhaps a developer wants to use the readonly attribute as intended. Maybe part of their form gets dynamically set to readonly in certain situations. If timepicker remains active despite the readonly attribute, the developer has the do the extra step of binding/unbinding timepicker every time their form toggled readonly on/off. Setting |
As mentioned readonly disables timepicker completely, I tried using disableTextInput however it doesn't seem to be disabling me from manually typing into the input. What may I be missing here?
Thanks |
Can you post a jsFiddle demo? |
Sorry, I was forking from an ROR gem it must have been faulty. It's working great now, thanks for your work! |
However, if you do disableTextInput - the user can still focus the field, delete values and end up posting invalid information. Any fix - work around to stop users from entering the field at all so they have no choice but to select a valid entry? |
|
@matheusjardimb indeed it should! Thanks for pointing that out. |
This works for me $('#myDatePicker').datepicker({ $('.readonlyjm').on('focus',function(){ |
Obviously readonly would break the showOn "focus". However, you would not expect it to break showOn "click". I have seen that you have disableInputText, which I'm currently using, but I don't want the user to focus the input at all.
The text was updated successfully, but these errors were encountered: