Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何限制Datepicker仅通过单击输入字段来关闭?
假设它的 UI datepicker 插件
见这里:http: //forum.jquery.com/topic/jquery-datepicker-plugin-how-to-prevent-the-datepicker-calendar-popup-from-closing
在这里:jQuery Datepicker:单击日期时防止关闭选择器
只需像这样覆盖 _checkExternalClick 函数:
jQuery.datepicker._checkExternalClick = function() {};