Happy Friday!
Trying to figure out how to have the message "Only" display only when a user select a day in the past, In addition have the submit button disable.
DatePicker1.BorderColor: If(DatePicker1.SelectedDate < Today(), Color.Red, RGBA(101, 128, 187, 1))
Warning.Text: "Dates in the past cannot be selected"
Warning.Color: Color.Red
Warning.Visible: DatePicker1.SelectedDate < Today()
I hope I've explained myself clearly. Thank you in advance.
Solved! Go to Solution.
Hi @oappdev
BorderColor
If(!IsBlank(DatePicker1.SelectedDate) && DatePicker1.SelectedDate < Today(), Color.Red, RGBA(101, 128, 187, 1))
Warning
IsBlank(DatePicker1.SelectedDate) || DatePicker1.SelectedDate < Today()
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
To have the message "Only" display only when a user select a day in the past... it looks like you've already done this.
Warning.Visible: DatePicker1.SelectedDate < Today()
You can make the submit button disable by changing the DisplayMode property to this code.
If(DatePicker1.SelectedDate < Today(), DisplayMode.Disabled, DisplayMode.Edit)
Note: I did not see that RezaDorrani had already posted but I think my DisplayMode code is part of the solution you'll need. If it works you can always accept both our answers as the solution.
---
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."
Hi @oappdev
BorderColor
If(!IsBlank(DatePicker1.SelectedDate) && DatePicker1.SelectedDate < Today(), Color.Red, RGBA(101, 128, 187, 1))
Warning
IsBlank(DatePicker1.SelectedDate) || DatePicker1.SelectedDate < Today()
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Thanks,
Reza Dorrani, MVP
YouTube
Twitter
To have the message "Only" display only when a user select a day in the past... it looks like you've already done this.
Warning.Visible: DatePicker1.SelectedDate < Today()
You can make the submit button disable by changing the DisplayMode property to this code.
If(DatePicker1.SelectedDate < Today(), DisplayMode.Disabled, DisplayMode.Edit)
Note: I did not see that RezaDorrani had already posted but I think my DisplayMode code is part of the solution you'll need. If it works you can always accept both our answers as the solution.
---
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."
User | Count |
---|---|
203 | |
92 | |
83 | |
47 | |
42 |
User | Count |
---|---|
252 | |
105 | |
103 | |
62 | |
57 |