Page 1 of 1

Is it possible to turn off validation on a date field?

Posted: Tue Sep 11, 2018 10:33 am
by machine0318
We like the date picker available with a date field. However, the error message is not desirable. Is there any way to turn off data validation on a date field?

Re: Is it possible to turn off validation on a date field?

Posted: Tue Sep 11, 2018 12:28 pm
by Megan
Hello Renee,

Have you bound this field as a date field? If so, it will check to make sure that the entered value is able to be passed to the RPG field. If you would rather parse the entry and convert it to a date in your RPG program, you can instead set the field as a character field, which would allow any valid character string to be passed. You could also set custom valid values if you would still like validation with the character field.

We hope this helps!

Thanks,

Re: Is it possible to turn off validation on a date field?

Posted: Tue Sep 11, 2018 3:55 pm
by Scott Klement
Hi Machine0318,

As Megan mentioned, it needs to know which parts are the month, day and year in order to format according to the rules of a bound date-type field. But, even if it's bound to a character field, it still needs to know these things in order for the pop-up calendar to work. Basically, the very things that make it the "date field widget" are the reasons why it must be validated. You could, of course, use a standard textbox widget if you didn't need the date functionality.

If the issue is that you want to support something different in the way it validates/formats the date, it is possible to write your own custom formatter/validator. There's information on that, here:
http://www.profoundlogic.com/docs/displ ... +Formatter

Does that help? I'm not understanding the reason behind your question, so it's hard to be sure if I'm helping.