cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tejaswini1234
Level: Powered On

PowerApps sharepoint custom form disable/inactive date picker dates which are before today's date only select the today's date and future dates in the date picker

Hello Guys, I want to inactive/disable the selection of dates in a date picker of sharepoint custom form in powerapps which selects only date for today's date and future dates not the past dates.

Please refer the below screenshot....

And Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: PowerApps sharepoint custom form disable/inactive date picker dates which are before today's date only select the today's date and future dates in the date picker

Hi @Tejaswini1234 ,

Do you want to disable the dates which are before today's date within the DatePicker control?

 

If you want to disable the dates which are before today's date within the DatePicker control, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider create a custom interactive calendar view within your app to achieve your needs.

More details about creating a interactive calendar view within PowerApps, please check the following blog:

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

In addition, I also think the Calendar Screen would also give you some help in your scenario:7.JPG

 

After you created a interactive calendar view within your app, then you could set the DisplayMode property of the Title Label within the MonthDayGallery to following:

If(ThisItem.Value < Weekday(Today(), StartOfWeek.Monday), DisplayMode.Disabled, DisplayMode.Edit)

Then you could achieve your needs as below:Test.gif

 

Please consider take a try with above alternative solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
jhall
Level 8

Re: PowerApps sharepoint custom form disable/inactive date picker dates which are before today's date only select the today's date and future dates in the date picker

It's a requested feature that's under review (as far as I can tell):  https://powerusers.microsoft.com/t5/PowerApps-Ideas/Restrict-available-dates-in-Datepicker-controls/...

However, you can of course catch and throw an error if a user does any invalid date near-term.

Highlighted
Community Support Team
Community Support Team

Re: PowerApps sharepoint custom form disable/inactive date picker dates which are before today's date only select the today's date and future dates in the date picker

Hi @Tejaswini1234 ,

Do you want to disable the dates which are before today's date within the DatePicker control?

 

If you want to disable the dates which are before today's date within the DatePicker control, I afraid that there is no way to achieve your needs in PowerApps currently.

 

As an alternative solution, you could consider create a custom interactive calendar view within your app to achieve your needs.

More details about creating a interactive calendar view within PowerApps, please check the following blog:

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

In addition, I also think the Calendar Screen would also give you some help in your scenario:7.JPG

 

After you created a interactive calendar view within your app, then you could set the DisplayMode property of the Title Label within the MonthDayGallery to following:

If(ThisItem.Value < Weekday(Today(), StartOfWeek.Monday), DisplayMode.Disabled, DisplayMode.Edit)

Then you could achieve your needs as below:Test.gif

 

Please consider take a try with above alternative solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,929)