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

前端 未结 11 1729
野性不改
野性不改 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:04

    That's how I managed to deal with this problem by making the browser think the user blured the input so it hides the keyboard before it has time to show :

    $('blabla')
        .datepicker(
        {
            /* options */
        })
        .on('focus',function()
        {
            $(this).trigger('blur');
        });
    

    Works well for me where many of the other solutions I found didn't !

提交回复
热议问题