简体   繁体   English

ASP日历:在上个月/下个月浏览时屏蔽

[英]asp calendar : blocking off when navigating previous/ next month

i'm using asp calendar in my webpage, when i was clicking the previous month arrow its just showing that month and popping off. 我在网页中使用asp日历,当我单击上个月的箭头时,它仅显示该月并弹出。 but if its month navigation it should display as per my requirement ? 但是如果它的月份导航应该按照我的要求显示呢? and its selection date it should pop off. 它的选择日期应该弹出。

Below is my code : 下面是我的代码:

<asp:Image ID="Image1" runat="server" Height="20px" ImageUrl="~/Images/calendar.GIF" Width="20px"    onclick="displayCalendar()"  />
<div id="datePicker"><asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" ></asp:Calendar></div>

function displayCalendar() {
    var datePicker = document.getElementById('datePicker');
    datePicker.style.display = 'block';
}

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
    {
        StartDate.Text = Calendar1.SelectedDate.ToString("d");
    }

anyone's help will be appreciated . 任何人的帮助将不胜感激。

thanks 谢谢

Got my solution for this question. 得到了我这个问题的解决方案。

OnsivibleMonthChanged="<function()>"

calendar control. 日历控件。

and defining the function to display the calendar. 并定义显示日历的功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM