Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery UI日期选择器按“关闭”;“好的”;按钮_Jquery_Jquery Ui_Datepicker_Jquery Ui Datepicker - Fatal编程技术网

Jquery UI日期选择器按“关闭”;“好的”;按钮

Jquery UI日期选择器按“关闭”;“好的”;按钮,jquery,jquery-ui,datepicker,jquery-ui-datepicker,Jquery,Jquery Ui,Datepicker,Jquery Ui Datepicker,我设置了这个按钮-关闭文本:“确定” 如何设置日期选择器,使其在我选择日期时不会关闭,并仅在按下“确定”按钮时关闭?尝试以下操作:- JS:- jQuery(function ($) { $("#datepicker").datepicker({ showButtonPanel: true, closeText: "Ok", onSelect:function(event){ event.prev

我设置了这个按钮-关闭文本:“确定”

如何设置日期选择器,使其在我选择日期时不会关闭,并仅在按下“确定”按钮时关闭?

尝试以下操作:- JS:-

jQuery(function ($) {
      $("#datepicker").datepicker({
          showButtonPanel: true,
          closeText: "Ok",
          onSelect:function(event){
              event.preventDefault();
          }
      });
  });
<input type="button" id="datepicker" value="Select a date" />
HTML:-

jQuery(function ($) {
      $("#datepicker").datepicker({
          showButtonPanel: true,
          closeText: "Ok",
          onSelect:function(event){
              event.preventDefault();
          }
      });
  });
<input type="button" id="datepicker" value="Select a date" />

选择日期时不突出显示