Hi @vivekajith
So let's say there's two date controls: dtStart and dtEnd. Set both to have a blank default.
On dtStart in the OnChange action:
If(Self.SelectedDate > dtEnd.SelectedDate,Reset(dtStart);UpdateContext({showDateError: true}),UpdateContext({showDateError: false}))
On dtEnd in the OnChange action:
If(Self.SelectedDate < dtStart.SelectedDate,Reset(dtStart);UpdateContext({showDateError: true}),UpdateContext({showDateError: false}))
Then have a label with text like "You cannot have a start date later than the end date", and set the 'Visible' property of that to
showDateError
Lastly, in the Submit button's DisplayMode property:
If(showDateError,DisplayMode.Disabled,DisplayMode.Edit)
That will have the effect of clearing any start date which is later than the end date, showing an error panel and preventing the user submitting until they've fixed it. 😀