Disable enter key in JQuery ui datepicker

前端 未结 5 1959
暗喜
暗喜 2020-12-11 04:58

There seems to be a bug with JQuery UI datepicker, when user manually enters a date, and hits enter, the datepicker closes but focus stays on the field and therefor calendar

5条回答
  •  感动是毒
    2020-12-11 05:38

    The simplest approach is to instantiate the datepicker on the like you normally would, but then get rid of the focus handler ourselves and replace it with a click handler.

提交回复
热议问题