HI,
i am in need of how to mark a appointment for few selectd days with the help of the calendar scheduler in windows application C#.net
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
Hemant SrivastavaRank #581 · 4.2K reputationPosted Dec 11, 2014, 9:27 AM EST
Are you using MonthCalendar control or DateTimePicker Control?
santhosh kumar61 reputationPosted Dec 11, 2014, 7:40 PM EST
Hemant SrivastavaRank #581 · 4.2K reputationPosted Dec 12, 2014, 8:41 AM EST
In MonthCalendar control you could select date range easily (with SelectionRange property) but you can't select scattered dates as there is no direct way selecting multiple dates in the calendar month
However you may use the following technique to select multiple dates:
http://stackoverflow.com/questions/1738824/c-sharp-and-month-calendar-selecting-multiple-dates
In the above link, he used following code in the KeyPress event handler
MonthCalendar.HitTestInfo info = monthCalendar1.HitTest(e.Location);
if (info.HitArea == MonthCalendar.HitArea.Date)
{
if (monthCalendar1.BoldedDates.Contains(info.Time))
{
monthCalendar1.RemoveBoldedDate(info.Time);
}
else
{
monthCalendar1.AddBoldedDate(info.Time);
monthCalendar1.UpdateBoldedDates();
}
}
Hope it will help