您好, 我在网络表单上有一个Ajax Control Tookit Date Picker。单击时控件按预期工作,即一旦选择了日期,或者用户单击另一个字段,日历就会关闭。 不幸的是,如果你选择Tab到下一个输入字段,日期选择器保持打开状态遮挡控件。一旦输入字段或日期选择器控件失去焦点,JQuery等效项将立即关闭。 我不是非常精通javascript,我能想到的唯一黑客解决方案是将onfocus事件添加到隐藏数据选择器控件所呈现的div的下一个字段。 这样的东西...... nextTextBox.Attributs.Add(onfocus,document.getElementById('datepickerdiv')。style.display ='none'); Any非常欢迎其他解决方案或修复。 谢谢
Hello, I have a Ajax Control Tookit Date Picker on a web form. The control works as desired when clicking i.e. the calendar closes once a date is selected or if the user clicks another field. Unfortunately if you Tab to the next input field, the Date Picker stays open obscuring the controls. The JQuery equivalent will close as soon as the input field or date picker control loses focus. I'm not very javascript savvy, the only hack solution I can think of is to add an onfocus event to the next field that hides the div that the Data Picker control is rendered in. Something like this... nextTextBox.Attributs.Add("onfocus", "document.getElementById('datepickerdiv').style.display = 'none'"); Any other solutions or fixes are much welcomed. Thanks
推荐答案我建议你使用Jquery datepicker。 blog.dreamlabsolutions/post/2009/05/04/jQuery-UI-DatePicker-instead-of-AJAX-Control-Toolkit-CalendarExtender-in-ASPNET.aspx [ ^ ] I suggest you to use Jquery datepicker. blog.dreamlabsolutions/post/2009/05/04/jQuery-UI-DatePicker-instead-of-AJAX-Control-Toolkit-CalendarExtender-in-ASPNET.aspx[^]
更多推荐
Ajax Control Toolkit日期选择器不隐藏
发布评论