cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Disable past dates start time selection- PowerApps and SharePoint Calendar

Hello,

I am creating a calendar  to submit events(Edit form) onto SharePoint using PowerApps.

I am trying to disable the Start Date value for any dates in the past. Only allow user to select today and future dates.

 

I tried using:  

If( DateValue1.SelectedDate < Weekday(Today(), StartOfWeek.Monday), DisplayMode.Disabled, DisplayMode.Edit)

 

on display mode of the darevalue1 and no success. Anyone able to help?

1 REPLY 1
Highlighted
Super User
Super User

Re: Disable past dates start time selection- PowerApps and SharePoint Calendar

To prevent users from selecting past dates:

1. Set a Variable: Set(MyDate,Today())

2. On the OnSelect of the DatePicker1:

If(DatePicker1.SelectedDate>MyDate,Notify("You     Cannot Choose Date Less Than Today",NotificationType.Error))

3. You can also put this formula on the Onsolect of Your SAVE Button:
If(DatePicker1.SelectedDate>MyDate,Notify("You     Cannot Choose Date Less Than Today",NotificationType.Error))

 

4. This will give an error message to the user as well as prevent them from saving

 

 

 

Helpful resources

Announcements
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (2,722)