【问题标题】:Select specific date in MonthCalendar [closed]在 MonthCalendar 中选择特定日期 [关闭]
【发布时间】:2014-03-28 14:32:27
【问题描述】:

是否可以使用变量自动定位月历中的某个日期?

DateTime example = Convert.ToDateTime("01/01/2014");

//Automatically select 1 January 2014 in the calendar
//(i.e. The date corresponding to the example variable above)

【问题讨论】:

  • 您希望它何时触发?每个系统打勾?自动是一个非常宽松的术语,您错过了一些研究工作

标签: c# date select monthcalendar


【解决方案1】:

使用MonthCalendar.SetDate方法

DateTime example = Convert.ToDateTime("01/01/2014"); 
monthCalendar.SetDate(example);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-09-28
    • 1970-01-01
    • 1970-01-01
    • 2023-03-17
    • 1970-01-01
    • 2016-06-06
    • 2014-05-15
    相关资源
    最近更新 更多