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 / DatePicker modificatio...
Power Apps
Answered

DatePicker modification and dropdown filtering for a custom list of items.

(0) ShareShare
ReportReport
Posted on by 43

Hi,

 

I am creating a vehicle booking app.

I have a select start date and select end date both using DatePicker - is there a way to implement coding so that once the first date is selected the second datepicker will not allow an earlier date to be selected?

 

Also

I have a dropdown for start time and a dropdown for end time - can anyone advise the best way to have this work so that. If the StartDate = EndDate then the drop downs will filter so that for the end time an earlier time will not be shown?

 

Thanks

Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at
    Hey!
     
    Currently powerapps doesnot support restricting the dates, maybe this feature will be added in near future. You can only restrict StartYear and EndYear.
     
    Instead what you can do is display an error message whenever the end date is less than start date. Also, you can disable the submit button when the error is displayed.
     
    Please modify the Visible property of Error Text:
    If(DatePicker2.SelectedDate < DatePicker3.SelectedDate && !IsBlank(DatePicker2.SelectedDate) && !IsBlank(DatePicker3.SelectedDate),true,false)
     
    Here, DatePicker2 refers to EndDate and DatePicker3 refers to StartDate
     
    Also, modify the DisplayMode property of Submit button as:
    If(DatePicker2.SelectedDate < DatePicker3.SelectedDate && !IsBlank(DatePicker2.SelectedDate) && !IsBlank(DatePicker3.SelectedDate),Disabled,Edit)
     
    Can you please share the items inside your start Time and End Time dropdown, so that we can assist you better.
     
    Thanks, 
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • KathrynHughes Profile Picture
    43 on at

    Thanks for your response! I have built my own calendar following:

     

    https://blogs.msdn.microsoft.com/davidni/2016/12/13/building-an-interactive-calendar-view-with-powerapps/

     

    Which allows me to be more flexible than using the DatePicker and I have disabled the start button when the conditions I do not like are present - this gives my app the functionality it needs!

     

    Thanks

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
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard