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

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

DatePicker missing MinDate

(0) ShareShare
ReportReport
Posted on by 4
I must put a value in date picker in section MinDate, but how many times I tried it's not available.
I even added a new data picker to my datacard, but still not there.
 
I want my app to prevent to create bookings in the past.
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    150,338 Most Valuable Professional on at
    DatePicker missing MinDate
    Just add it conditionally at the top
    If(
       Self.SelectedDate < Today();
       Notify(
          "You cannot select a date in the past";
          NotificationType.Error;
          5000
       );;
       Reset(Self);
       Clear(colPotentialConflicts);;
       If(
          !IsBlank(ddVervolg_2.Selected.Value) And !IsBlank(dpDatum_2.SelectedDate);
          Collect(
             colPotentialConflicts;
             Filter(
                'Parking Kansfonds';
                Parkeerplek.Value = ddVervolg_2.Selected.Value;
                Datum >= DateValue(Self.SelectedDate) And
                Datum < DateValue(Self.SelectedDate) + 1
             )
          )
       )
    )
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn 
      
  • RZ-17091353-0 Profile Picture
    4 on at
    DatePicker missing MinDate
    Hi Warren,
     
    Thanks for your quick reply!!
    What if I have already some code stored in OnChange?
     
    ==============================================================
    // Clears the old results and finds any conflicts for the new selection
    Clear(colPotentialConflicts);;
     
    If(
        !IsBlank(ddVervolg_2.Selected.Value) And !IsBlank(dpDatum_2.SelectedDate);
        Collect(
            colPotentialConflicts;
            Filter(
                'Parking Kansfonds';
                Parkeerplek.Value = ddVervolg_2.Selected.Value;
                Datum >= DateValue(dpDatum_2.SelectedDate) And
                Datum < DateValue(dpDatum_2.SelectedDate) + 1
            )
        )
    )
    ==================================================================================
  • WarrenBelz Profile Picture
    150,338 Most Valuable Professional on at
    DatePicker missing MinDate
    You can do this OnChange of the Date Picker
    If(
       Self.SelectedDate < Today(),
       Notify(
          "You cannot select a date in the past",
          NotificationType.Error,
          5000
       );
       Reset(Self)
    );
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful?
    Visit my blog
    Practical Power Apps    LinkedIn   
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 982 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 396 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 356

Last 30 days Overall leaderboard