I\'ve had a look around, once again and can\'t find how to set the minimum and maximum dates allowed to be selected on a calendar in ASP.net with VB.
I\'m using Visu
You need to handle the Calendar's DayRender event:
Private MinDate As Date = Date.MinValue
Private MaxDate As Date = Date.MaxValue
Protected Sub Calendar1_DayRender(sender As Object, e As DayRenderEventArgs)Handles Calendar1.DayRender
If e.Day.Date < MinDate OrElse e.Day.Date > MaxDate Then
e.Day.IsSelectable = False
End If
End Sub
Then you can set it for example in Page_Load
:
MinDate = Date.Today
MaxDate = MinDate.AddDays(7)