web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Date Picker Future Dates
Power Apps
Unanswered

Date Picker Future Dates

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I am working with Powerapps using the sharepoint list and there is a date picker field in this form and i want that the user can only select current or past dates not the future or coming date. If Someone have solution please share with me that how i can prevent to select the future dates.

Thanks 

Categories:
  • dinusc Profile Picture
    Microsoft Employee on at

    Hello @Anonymous,

    You most likely have a "Submit" button that allows the user to save the changes (via SubmitForm or Patch for example).

    I would suggest to disable that button when the user selects a wtrong date. Additionally, you could color the background of the DatePicker control differently and add a message. Example:

    1. Copy the following formula to the DatePicker.Fill field: If(DatePicker1.SelectedDate <= Today(), RGBA(255, 255, 255, 1), RGBA(255, 0, 0, 1))

    2. Copy the following formula to the Submit button's DisplayMode field: If(DatePicker1.SelectedDate <= Today(), DisplayMode.Edit, DisplayMode.Disabled)

    Similarly, you can "unhide" a label with a warning message.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @dinusc i don't have custom save button but i have the save button by default can we disabled this.i attached the png of form.

    mileage.png
  • dinusc Profile Picture
    Microsoft Employee on at

    For form validaion in SharePoint, please use the "Column Validation". In SharePoint Online, you can find that option after selecting the "List Settings", then selecting the date column you need validation for and then "Column Validation" option at the bottom:

    Capture.PNG

    You can some formula validatino examples here: https://support.office.com/en-us/article/examples-of-common-formulas-in-sharepoint-lists-d81f5f21-2b4e-45ce-b170-bf7ebf6988b3

    Please note that you can still color the control differently by customizing your SharePoint form in PowerApps (see PowerApps/Customize Forms menu option in SharePoint).

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    i want through powerapps 

  • dinusc Profile Picture
    Microsoft Employee on at

    When you customize the form, you do not have access to SharePoint controls (the save button is not available). If you intend to save the form from PowerApps application then you can create an application out of that form (as opposed to customizing it) and then follow the previous comment for disabling the "Save" button. The only way to alter the flow in SharePoint though (as shown in the picture from your previous message) is to add the validation formula in SharePoint.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard