<tfoot id='954ie'></tfoot>
      <bdo id='954ie'></bdo><ul id='954ie'></ul>

  • <i id='954ie'><tr id='954ie'><dt id='954ie'><q id='954ie'><span id='954ie'><b id='954ie'><form id='954ie'><ins id='954ie'></ins><ul id='954ie'></ul><sub id='954ie'></sub></form><legend id='954ie'></legend><bdo id='954ie'><pre id='954ie'><center id='954ie'></center></pre></bdo></b><th id='954ie'></th></span></q></dt></tr></i><div id='954ie'><tfoot id='954ie'></tfoot><dl id='954ie'><fieldset id='954ie'></fieldset></dl></div>

  • <legend id='954ie'><style id='954ie'><dir id='954ie'><q id='954ie'></q></dir></style></legend>

    <small id='954ie'></small><noframes id='954ie'>

        jQuery UI datepicker 在对话框中自动打开

        时间:2023-09-04
      1. <i id='bRKzK'><tr id='bRKzK'><dt id='bRKzK'><q id='bRKzK'><span id='bRKzK'><b id='bRKzK'><form id='bRKzK'><ins id='bRKzK'></ins><ul id='bRKzK'></ul><sub id='bRKzK'></sub></form><legend id='bRKzK'></legend><bdo id='bRKzK'><pre id='bRKzK'><center id='bRKzK'></center></pre></bdo></b><th id='bRKzK'></th></span></q></dt></tr></i><div id='bRKzK'><tfoot id='bRKzK'></tfoot><dl id='bRKzK'><fieldset id='bRKzK'></fieldset></dl></div>

        1. <tfoot id='bRKzK'></tfoot>
            <tbody id='bRKzK'></tbody>

          <small id='bRKzK'></small><noframes id='bRKzK'>

                <bdo id='bRKzK'></bdo><ul id='bRKzK'></ul>

                • <legend id='bRKzK'><style id='bRKzK'><dir id='bRKzK'><q id='bRKzK'></q></dir></style></legend>
                  本文介绍了jQuery UI datepicker 在对话框中自动打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个在 jQuery 对话框对象中使用的日期选择器.对话框内容的来源是使用 .load() 加载的.在对话框中,我创建了一个脚本,该脚本为文本输入创建了一个日期选择器.

                  I have a datepicker which is used within the jQuery dialog object. The source of the dialog's content is loaded using .load(). Within the dialog I created a script which creates a datepicker for the text input.

                  $("#date").datepicker({ ... });
                  

                  当我第一次打开对话框时 - 一切正常,但如果我关闭它并再次打开,日期选择器会自动触发(并且没有像 autoOpen:false 这样的选项)有什么方法可以防止这种情况发生吗?或者我做错了什么?

                  When I open the dialog for the first time - everything is okay, but if I close it and reopen again, the datepicker is triggered automatically (and there's no such an option like autoOpen:false) Is there any way of preventing this or what am I doing wrong?

                  推荐答案

                  我遇到了这个确切的问题,并且只对 tvanfosson 的技术稍作改动就解决了它.出于某种原因,我不得不手动将点击"事件附加到日期选择器字段,如下所示.

                  I had this exact problem and solved it with only a slight variation on tvanfosson's technique. For some reason I had to manually attach the "click" event to the datepicker field as below.

                   $('#dialog').dialog({
                   open: function(event, ui) {
                      $(ui).find('#date').datepicker().click(function(){
                          $(this).datepicker('show');
                      });
                   },
                   close: function(event,ui) {
                      $(ui).find('#date').datepicker('destroy');
                   }});
                  

                  (抱歉——我更愿意将此作为评论发布到 tvanfosson 的帖子,但没有必要的代表.)

                  (Sorry--I would've preferred to post this as a comment to tvanfosson's post but don't have the requisite rep.)

                  这篇关于jQuery UI datepicker 在对话框中自动打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Jquery-UI 对话框 - 在没有 DIV 的情况下运行 下一篇:将部分视图加载到 JQuery 对话框中的缓存问题

                  相关文章

                  最新文章

                  <legend id='naVR6'><style id='naVR6'><dir id='naVR6'><q id='naVR6'></q></dir></style></legend><tfoot id='naVR6'></tfoot><i id='naVR6'><tr id='naVR6'><dt id='naVR6'><q id='naVR6'><span id='naVR6'><b id='naVR6'><form id='naVR6'><ins id='naVR6'></ins><ul id='naVR6'></ul><sub id='naVR6'></sub></form><legend id='naVR6'></legend><bdo id='naVR6'><pre id='naVR6'><center id='naVR6'></center></pre></bdo></b><th id='naVR6'></th></span></q></dt></tr></i><div id='naVR6'><tfoot id='naVR6'></tfoot><dl id='naVR6'><fieldset id='naVR6'></fieldset></dl></div>