Add MaxDate and MinDate properties to avoid selecting dates out of range. Examples:
Avoid selecting dates in the past:
Set maximum selectable date to 1 year in the future since today:
Datepicker1.MaxDate: DateAdd( Today(), 1, Years )
Attached image shows what it would look like MinDate property 🙂
Updating status and adding @FilipK
@Digital: the semicolon is correct if you are in Europe.
@FlyitComPl: since recent you can also say If(Self.SelectedDate>Today();Reset(Self))Yay!
My requirement is user able to select the past 18 years' date.
I also want to prevent user from selecting dates in the future for expense reports.
It would be nice if we could set the DatePicker to show only month and year.