[英]currently selected month in asp.net calendar control
How do I know which month is selected when no date is selected. 如何在未选择日期时知道选择了哪个月。
For eg, on page load, the calendar will show december. 例如,在页面加载时,日历将显示12月。 The user click ">" button to show January. 用户单击“>”按钮显示1月。
How do I know that he has selected January? 我怎么知道他选择了1月份?
Tkz TKZ
You can use the VisibleMonthChanged
event to identify that. 您可以使用VisibleMonthChanged
事件来识别它。
protected void Cal1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
{
//e.NewDate.Month will have the new visible month
}
To obtain the name of the month, check these web pages. 要获取月份名称,请检查这些网页。
Best way to turn an integer into a month name in c#? 在c#中将整数转换为月份名称的最佳方法?
http://www.norecursion.com/blog/archive/2010/05/21/how-to-get-month-name-from-integer.aspx http://www.norecursion.com/blog/archive/2010/05/21/how-to-get-month-name-from-integer.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.