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

前端 未结 11 1745
野性不改
野性不改 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 14:02

    Using the latest version of the DatePicker, it's possible to do it like this:

    //for tablets / phones
        $('#yourElement').datepicker().on('show', function (e) {
            $(this).trigger('blur');
        })
    

    Please note however, the keyboard may flash at the bottom of the screen for a second until the blur() is enacted.

提交回复
热议问题