Hello,
I'm wondering if I can modify a calendar within a form on Powerapps that would restrict anyone from picking a date more than 120 days ago from today's date.
It's basically a credit card dispute form in which we do not dispute transactions made more than 120 days ago, but as an organization, we're often finding our staff submitting things from way longer than 120 days ago. Is there a way to gray out the days beyond 120? Or even just restrict it so it won't allow the user to proceed?
By the way, my calendar was pulled from a Sharepoint List Data source.
Solved! Go to Solution.
@Kookykrumbs
Yes, you can restrict the user from moving forward if they have picked an invalid date. To do this put my code in the DisplayMode property of the Submit button.
If(DatePicker_Transaction.SelectedDate < Today() - 120, DisplayMode.Disabled, DisplayMode.Edit)
You could also make a warning pop up with the text "Must selected a valid date" by using this code in the Visible property of a label.
DatePicker_Transaction.SelectedDate < Today() - 120
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
@Kookykrumbs
Yes, you can restrict the user from moving forward if they have picked an invalid date. To do this put my code in the DisplayMode property of the Submit button.
If(DatePicker_Transaction.SelectedDate < Today() - 120, DisplayMode.Disabled, DisplayMode.Edit)
You could also make a warning pop up with the text "Must selected a valid date" by using this code in the Visible property of a label.
DatePicker_Transaction.SelectedDate < Today() - 120
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hello,
Thank you @mdevaney for the quick response. I really like your label idea. I gave it a try, but the label doesn't pop up, and there's a red x at the top left hand corner of the label which in the screenshot I've attached is invisible. Do you know what I missed?
@mdevaney Nevermind! Please disregard, I figured it out. I had to replace "DatePicker_Transaction" with "DataCardValue4". Thank you!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
45 | |
45 | |
34 | |
34 |
User | Count |
---|---|
256 | |
82 | |
78 | |
67 | |
65 |