Bugfix/FOUR-4903: Date Field validation not working with calc prop (For 4.1) #1127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue & Reproduction Steps
Issue 1
Validations not working for calculated properties (after date, before date, after or equal date, before or equal date)
Issue 2
Client is returning a date with the format DD/MM/YYYY and should be YYYY-MM-DD as described in the documentation
Issue 3
If you have a datetime input with the value eg. 15/12/2021 11:52 and we want to validate if after (not after or equal) than 15/12/2021 the output should be false becase is not after, is equal date, but is returning true because the currentDate is 15/12/2021 00:00 and the input date is 15/12/2021 11:52. The same happens with the other cases.
Reproduction steps
Sample calc property code (set name of the calc property to currentDate):
Solution
How to Test
Use the previous sample calc property code and set name of the calc property to currentDate
Working video
Screen.Recording.2021-12-15.at.15.27.25.mov
Related Tickets & Packages