문제

Is it possible to use a variable to automatically locate a certain date in a month calendar?

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)
도움이 되었습니까?

해결책

Use MonthCalendar.SetDate method

DateTime example = Convert.ToDateTime("01/01/2014"); 
monthCalendar.SetDate(example);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top