Ajax Control Toolkit日期选择器不隐藏

编程入门 行业动态 更新时间:2024-10-23 12:34:12
本文介绍了Ajax Control Toolkit日期选择器不隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好, 我在网络表单上有一个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日期选择器不隐藏

本文发布于:2023-11-25 02:11:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627898.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:日期   选择器   Ajax   Control   Toolkit

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!