I am currently working on calendar registration, for the data I just need two timestamp (start datetime and end datetime).
On my registration page I have 4 items to serve this purpose: P2_DATE, P2_START_TIME, P2_END_TIME and P2_HOURS.
P2_HOURS is an item that is derived from the start and end times. For this calculation (both for hours and end time) I use dynamic actions.
And to ensure no invalid data enters the database I have a check that checks the two timestamps to see if START_TIME is earlier than END_TIME.
The problem now is that when you try to add a time, decide to last minute change the value of hours and only click on the button afterwards (so you dont unfocus the hours item and let it calculate the new value for end time) it does the validation while the dynamic action is still calculating the new values, giving an error that END_TIME is less than START_TIME.
I know this can be fixed by taking out the validation and moving it to (for example) a dynamic action and move the insert/update etc. processes to the dynamic actions as well. However this takes a decent amount of work and I was wondering if there was a better and/or easier way to do this.