Ajax Control Toolkit日期选择器不隐藏 [英] Ajax Control Toolkit Date Picker Not Hiding

查看:110
本文介绍了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。

http://blog.dreamlabsolutions.com/post/2009/05/04/jQuery-UI-DatePicker-instead-of-AJAX-Control-Toolkit-CalendarExtender-in-ASPNET.aspx [ ^ ]
I suggest you to use Jquery datepicker.
http://blog.dreamlabsolutions.com/post/2009/05/04/jQuery-UI-DatePicker-instead-of-AJAX-Control-Toolkit-CalendarExtender-in-ASPNET.aspx[^]


这篇关于Ajax Control Toolkit日期选择器不隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆