I saw this question posted elsewhere but I am unable to get the error message to display when the start date is after the end date. Maybe I have it in the wrong place?
I have 3 date pickers.
First
Last
Complete
First is not a requirement but if it's filled in, it must be on/before Last
Last is not a requirement but if it's filled in, it must be on/after First
Complete is not a requirement but if it's filled in, it must be on/after First and/or Last
When these conditions are not met, I want the date picker to outline in red. I also want to display an error message. Here was a previous solution that was provided.
datePickerStart.BorderColor: If(datePickerEnd.SelectedDate < datePickerStart.SelectedDate, Color.Red, RGBA(101, 128, 187, 1))
datePickerEnd.BorderColor: If(datePickerEnd.SelectedDate < datePickerStart.SelectedDate, Color.Red, RGBA(101, 128, 187, 1))
labelInvalidDates.Visible: datePickerEnd.SelectedDate < datePickerStart.SelectedDate
With this solution, there are only 2 date pickers. The solution requires the fields have an input and also I can't get the error message to display.