How to blur the first form input at the dialog opening

后端 未结 6 1784
花落未央
花落未央 2021-01-13 23:33

I have a jQuery.dialog who show a form.
The first input is and I init the datepicker like this jQue

6条回答
  •  感动是毒
    2021-01-14 00:05

    As mentioned, this is a known bug with jQuery UI and should be fixed relatively soon. Until then...

    Here's another option, so you don't have to mess with tabindex:

    Disable the datepicker temporarily until the dialog box opens:

    dialog.find(".datepicker").datepicker("disable");
    dialog.dialog({
        "open": function() {$(this).find(".datepicker").datepicker("enable");},
    });
    

    Works for me.

提交回复
热议问题