Вопрос

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