JQuery UI Datepicker loses focus when selecting date with mouse

后端 未结 10 1561
情歌与酒
情歌与酒 2021-02-01 02:16

I am using JQuery ui with datepicker and when a user tabs on to a field, they appropriately get the calendar pop up.

  1. User tabs (via key onto field
  2. User s
10条回答
  •  执念已碎
    2021-02-01 02:53

    I have added an empty href tag next to the datepicker input control and focus onto it in the onClose event handler. This solved my problem of the focus shifting all the way to the top of the page when the calendar was closed. I am using that href tag to display error messages; therefore it serves two purposes for me.

提交回复
热议问题