How to disable back dates in power app calender

Mohammad Qasim 576 Reputation points
2021-07-05T22:19:06.903+00:00

Greetings,

I am using power app,

Problem: Required want to hide back dates in power app calendar so user cannot select back dates

Solution Required : How can i disable/hide/inactive back dates in power app calendar

Image is attached for reference

111971-whatsapp-image-2021-07-06-at-31407-am.jpeg

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Elsie Lu_MSFT 9,801 Reputation points
    2021-07-06T07:04:08.93+00:00

    Hi @Mohammad Qasim ,

    This requirement can be achieved.You could use a notification OnSelect of the DatePicker or OnSelect of a Button:

    If(DatePicker1.SelectedDate<Today(),Notify("Selected date cannot be before Today",Error))  
    

    Test result:
    112016-5.gif

    References:
    Disable past dates from datepicker in powerapps
    Disable past dates start time selection


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Mikey Mo 1 Reputation point
    2022-09-23T17:45:09.18+00:00

    I would use the OnChange property so the error will only appear after the user selects a date. If OnSelect is used, the error will trigger again when the user presses the calendar button to correct the mistake.

    You can also set the DisplayMode of your Form save button to disabled with the same logic, preventing the user from continuing:

    DisplayMode: If(DatePicker1.SelectedDate<Today(),Disabled))

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.