This is a migrated thread and some comments may be shown as answers.

Disallow text input on iPad

1 Answer 74 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 26 Mar 2013, 11:14 PM
I would like to make the datepicker readonly but still allow the user to select the date via the picker.

I've tried:

$("#datepicker").attr("disabled", "disabled");

This works on my PC but not on the iPad, on the iPad it appears to disable the picker as well.  In addition I don't want the visual style to change though I could probably figure out how to fix that.

I also tried:

$("#datepicker").attr("readonly", "readonly");

This one actually does exactly what I want when testing on a PC, but again on the iPad it appears to also disable the picker.  How do I get the behavior on the iPad to match so the picker is enabled but the user cannot input text?

1 Answer, 1 is accepted

Sort by
0
Kjell
Top achievements
Rank 1
answered on 27 Mar 2013, 02:22 AM
nevermind...please delete this thread
Tags
Date/Time Pickers
Asked by
Kjell
Top achievements
Rank 1
Answers by
Kjell
Top achievements
Rank 1
Share this question
or