Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top