Is it possible to turn off validation on a date field?
-
- New User
- Posts: 4
- Joined: Tue Feb 27, 2018 11:46 am
- First Name: Renee
- Last Name: Taylor
- Company Name: Winsupply
- State / Province: Ohio
- Country: United States
- Contact:
Is it possible to turn off validation on a date field?
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?
- Megan
- Profound Logic Staff Member
- Posts: 90
- Joined: Mon Sep 11, 2017 12:15 pm
- First Name: Megan
- Last Name: Bond
- Company Name: Profound Logic
- Phone: 5623227473
- State / Province: California
- Zip / Postal Code: 92692
- Country: United States
- Contact:
Re: Is it possible to turn off validation on a date field?
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,
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,
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Is it possible to turn off validation on a date field?
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.
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.
Who is online
Users browsing this forum: No registered users and 7 guests