Question

How can i disable the past date and only enable 3 dates from today's date in monthcalendar using vb.net? I couldn't find the dayrender event.

Any ideas?

Thanks in advance.

Was it helpful?

Solution

You can makeuse of MinDate and MaxDate property of the MonthCalendar control to achieve your need,

CODE:

MonthCalTest.MinDate = New DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day)
MonthCalTest.MaxDate = MonthCalTest.MinDate.AddDays(3)

MINDATE - MAXDATE

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top