CalendarExtender在日历外部单击时不会隐藏 [英] CalendarExtender not getting hide on clicking outside the calendar

查看:104
本文介绍了CalendarExtender在日历外部单击时不会隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了CalendarExtendar控件隐藏功能的问题.

I am facing an issue with the CalendarExtendar control hide functionality.

我正在点击图片显示日历.如果我选择一个日期,它将隐藏.但是当我不想从日历中选择任何日期时,它不会隐藏.

I am displaying the calendar on an image click. It hides if I select a date; but it does not hide when I do not want to select any date from the calendar.

我发现这仅在我的应用程序中发生.我尝试在示例应用程序中使用相同的控件,但效果很好.

I found this happening only in my application. I tried using the same control in a sample application and it works fine.

是因为我的项目中实现了MasterPage吗?

Is it because my project has MasterPage implemented in it?

请提出建议.

推荐答案

我使用了一个文本框控件&一个日历控件,但是在单击日历日期页面后发生了回发,并且该日历没有隐藏.我尝试了所有方法,但从未成功.请找到以下代码.

I took one textbox control & one Calender control but after clicking on calender date page post back happen and after that calender was not hiding. I tried all they way but it's never work. Please find the code following.

<asp:TextBox ID="txtFromDateSubmit" runat="server" TabIndex="7" CssClass="calendar" OnTextChanged="txtFromDateSubmit_TextChanged" AutoPostBack="True" MaxLength="12" AutoCompleteType="Disabled"></asp:TextBox>
<asp:CalendarExtender ID="ceBatchDateSubmit" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFromDateSubmit"></asp:CalendarExtender>

此后,我错误地删除了 TabIndex ,它开始为我工作.如果你们有同样的问题,并且与我的代码匹配,可以尝试一下.

After that by mistake i remove TabIndex and it's start working for me. If you guys having same issue and it's matching with my code you can try it.

这篇关于CalendarExtender在日历外部单击时不会隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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