本文介绍了ASP日历:在上个月/下个月浏览时被阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网页中使用asp日历,当我单击上个月的箭头时,它仅显示该月并弹出.但是如果它的月份导航应该按照我的要求显示呢?及其选择日期.
i'm using asp calendar in my webpage, when i was clicking the previous month arrow its just showing that month and popping off. but if its month navigation it should display as per my requirement ? and its selection date it should pop off.
下面是我的代码:
<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 .
谢谢
推荐答案
我已经解决了这个问题.
Got my solution for this question.
OnsivibleMonthChanged="<function()>"
日历控件.
并定义显示日历的功能.
and defining the function to display the calendar.
这篇关于ASP日历:在上个月/下个月浏览时被阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!