cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict available dates in Datepicker controls

Add MaxDate and MinDate properties to avoid selecting dates out of range. Examples:


Avoid selecting dates in the past:

Datepicker1.MinDate: Today()

 

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 🙂

Status: Under Review

Updating status and adding @FilipK

Comments
Helper V

@Digital: the semicolon is correct if you are in Europe.

@FlyitComPl: since recent you can also say If(Self.SelectedDate>Today();Reset(Self))
Yay! 

Frequent Visitor

My requirement is user able to select the past 18 years' date. 

Advocate I

I also want to prevent user from selecting dates in the future for expense reports.

Regular Visitor

Hi,

 

It would be nice if we could set the DatePicker to show only month and year.

 

 

Helper V

Ideally the date picker would be configurable in the following ways:

 

  • Select a date range
  • Select a start day of the week - Sunday US, Monday Europe
  • Ability to exclude dates e.g. dates in the past
  • Enable user to select a date or range without the need to click OK
  • Configure the appearance without the need to hack JSON in msapp or change the theme