Skip to main content

How to Stop Users Picking a Future Date in a Power Apps Date Picker

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

Some dates can't be in the future: the day a shift was worked, a delivery that has arrived, an accident that has happened. Set the modern date picker's EndDate to Today(), and its calendar greys out every day after today.

The example is the Log overtime screen of the Overtime Timesheet app, where people log overtime they've already worked. How to Add a Date Picker in Power Apps adds the date picker, dpWorkDateLO.

How It Works​

The modern date picker has two properties for the range people can choose from (Date picker modern control):

PropertyWhat it doesDefault
StartDateThe earliest date that can be selected; earlier dates are disabledDate(1900, 1, 1)
EndDateThe latest date that can be selected; later dates are disabledDate(Year(Today())+100, 12, 31)

Step 1: Set EndDate to Today​

Select the date picker and set EndDate:

dpWorkDateLO → EndDate
Today()

Today is the current date at midnight, so today itself can still be chosen. The preview strip shows the value Studio uses:

The formula bar with EndDate set to Today(), the preview strip reading Today() = 08/11/2026, 00:00:00 with Data type Date, and the date picker on the canvas showing 08/11/2026

Step 2: Check the Calendar​

Preview the app and open the calendar. In the example, on 8 November 2026, the days from the 9th onwards are greyed out, and so is the arrow to the next month and Dec in the month list:

The date picker in Preview showing 08/11/2026 with its calendar open on November 2026: days up to the 8th in black, the 9th to the 30th and early December greyed out, the next month arrow greyed, and Dec greyed in the 2026 month list

In the page, each of those day buttons was disabled: selecting them does nothing.

Check the Date When You Save Too​

EndDate shapes the calendar; it isn't a rule on your data. Anyone who edits the data source another way, such as the SharePoint list itself, isn't stopped by it. The example also checks the whole shift before saving: a shift whose finish time is later than now gets the message This shift hasn't finished yet. Log it after it ends. (How to Validate a Form Without an Edit Form in Power Apps).

Common Mistakes​

MistakeWhat happensDo this instead
Setting only DefaultDate to Today()The calendar starts on today, but EndDate still allows the next hundred yearsSet EndDate too
Relying on EndDate aloneOther ways of editing the data aren't coveredCheck the date in your save logic as well
Changing StartDate to block future datesStartDate is the earliest date, not the latestUse EndDate

Troubleshooting​

SymptomLikely causeFix
Future days aren't greyed outEndDate still has its defaultSet it to Today()
Today is greyed out tooEndDate is set to a date before todayUse Today()
The next month's arrow is disabledEvery day of the next month is after EndDateThat's the restriction working

FAQ​

Can I stop dates that are too far in the past?​

Yes: StartDate works the same way at the other end of the range. The example leaves it at its default, because overtime from an earlier month can still be logged.

Does EndDate stop people typing a later date?​

The example's date picker has IsEditable set to false, its default, so people can only choose from the calendar. The save check above covers the rest.

Conclusion​

EndDate: Today() greys out every day after today in the modern date picker's calendar. Keep a check in the save logic as well, because EndDate only shapes the calendar.

Additional Resources​