Hi
My goal is to make all wednesdays in a month to be bolded and selectable. Whereas, the other dates should be greyed out and the user should not be able to select.
So pls help me how can we implement this in a c#.Net windows calendar control
Hi
My goal is to make all wednesdays in a month to be bolded and selectable. Whereas, the other dates should be greyed out and the user should not be able to select.
So pls help me how can we implement this in a c#.Net windows calendar control
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Scott LysleRank #49 · 31K reputationPosted Dec 30, 2008, 8:08 PM EST
You can bold the Wednesdays with something like this:
List
<DateTime> weds = new List<DateTime>(); for(int d = 1; d < DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); d++ ){
DateTime thisDay = new DateTime(DateTime.Now.Year, DateTime.Now.Month, d); if (thisDay.DayOfWeek == DayOfWeek.Wednesday){
weds.Add(thisDay);
}
if (DateTime.Now.DayOfWeek == DayOfWeek.Wednesday)weds.Add(
DateTime.Now);monthCalendar1.BoldedDates = weds.ToArray();
}