gpt4 book ai didi

c# - 当前在 asp.net 日历控件中选择的月份

转载 作者:行者123 更新时间:2023-11-30 12:17:00 26 4
gpt4 key购买 nike

当没有选择日期时,我如何知道选择了哪个月份。

例如,在页面加载时,日历将显示十二月。用户点击“>”按钮显示一月。

我怎么知道他选择了 January?

谢谢

最佳答案

您可以使用 VisibleMonthChanged 事件来识别它。

protected void Cal1_VisibleMonthChanged(object sender, MonthChangedEventArgs e)
{
//e.NewDate.Month will have the new visible month
}

要获取月份名称,请查看这些网页。

Best way to turn an integer into a month name in c#?

http://www.norecursion.com/blog/archive/2010/05/21/how-to-get-month-name-from-integer.aspx

关于c# - 当前在 asp.net 日历控件中选择的月份,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4374937/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com