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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hemant SrivastavaPosted Dec 12, 2014, 1:41 PM
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
santhosh kumarPosted Dec 12, 2014, 12:40 AM
Hemant SrivastavaPosted Dec 11, 2014, 2:27 PM
Are you using MonthCalendar control or DateTimePicker Control?