2 Date compare and validation
Hi, I was wondering does anyone has to solve the problem with validation one date from another form the form prompt.
I have form with 2 dates that describes specified period: field Date_from and Date_to.
I need to validate form that always Date_to >=Date_from.
Without fulfils this condition, users should not save the form.
Best Answer
-
Konstantin_Slavin-Bo Customer Ninja IT Monkey ✭✭✭✭There's no OOB solution to this, but you can take a look at John Doyle's RO Toolbox here:
https://community.cireson.com/discussion/comment/8550/#Comment_8550
It includes a solution to exactly this problem, where you first set a Display Only prompt "@DateRange" and right afterwards add your two date prompts. The RO Toolbox will then hide the Display Only prompt, and make the two date prompts behave like what you describe.
5
Answers
https://community.cireson.com/discussion/comment/8550/#Comment_8550
It includes a solution to exactly this problem, where you first set a Display Only prompt "@DateRange" and right afterwards add your two date prompts. The RO Toolbox will then hide the Display Only prompt, and make the two date prompts behave like what you describe.
Thanks for your help, but it won't works. I have prompts as below:
- @DateRange / Display only / Text
- Date1 / Required / Date
- Date2 / Required / Date
but nothing happened. Of course the RO Toolbox works - I test @AutoComplete with success.Could you try to copy/paste this code into the browsers devtool console (F12 > Console), and see if it works? And if it gives any errors, please copy them back here.
I try to set the maximum range of Date2 prompt and the @DataRange don't work. When remove the range in Config Prompt it wokrs.
I configure it according to post https://community.cireson.com/discussion/comment/10730#Comment_10730Konstantin_Slavin-Bo
Aha okay. Yeah, it seems there's something overriding the values, which are set on the custom date pickers, with the values from RO config, each time the field is in focus. I'll see if I can find a fix for this, but I can't make any promises on neither time or success.