ipad web application: How do I prevent the keyboard from popping up on jquery datepicker

前端 未结 11 1742
野性不改
野性不改 2020-12-02 13:42

I have a form with an date field with a jquery datepicker attached to it.

When I select the date field the datepicker pops up but then the iPad keyboard slides into

11条回答
  •  无人及你
    2020-12-02 13:46

    I believe the better way to do this in modern browsers is to use inputmode="none". Here's the HTML code:

    At least on Android Chrome this is allowing my datepicker (obviously separately initialized via jQuery) to come up on my phone and the soft keyboard does not come up.

    This prevents the issues that are possible with making the field readonly (not being able to clear the value, etc)

提交回复
热议问题