How to blur the first form input at the dialog opening

后端 未结 6 1772
花落未央
花落未央 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:07

    $('.datepicker').blur();

    this would just trigger the blur function just like a use would, therefore the datepicker would hide .

    The problem could be because you have set focus on document load somewhere on your script to the first element. so either try and remove that option, or add the above line on document load :)

提交回复
热议问题