Form validation and Date datatype

T

TimPGade

It is my understanding that if a field/element is a Date (date) Data type
then the form field cannot be blank at validation. To allow blank values I
need to change the Data type to Text (string).

Is there any other way to have the field as a Date and allow a blank date as
a valid value or do I need to make it a string and then check for a valid
date if not blank?
 
T

TimPGade

Can somebody direct me to an answer for this? It's been 3 weeks since I
posted it.
 
R

Ross Culver

Tim,

Where did you hear that you couldn't validate against a blank date field?
Or to be more exact, a datepicker object? I have a rule in my validation
that ensures that the user must enter a date in the datepicker and this
validation works fine.

Ross
 
T

TimPGade

Just the opposite. I want to allow a blank date but the datepicker is
expecting a valid one.
 
R

Ross Culver

I guess the question then is, what is a valid value to validate. You can't
enter a value that isn't equal to a date in a datepicker, so there's you're
validation. And you can leave a datepicker blank.

Ok, try this (again, I'm assuming that you're using a datepicker and not
just a textbox), set your validation to use two conditions against the date
field 1) that it isn't blank AND that it's, I don't know, maybe greater than
a certain date. In other words, whatever the conditions if you include that
it isn't blank and another condition then it should allow blank that meet
the second condition.

Make sense?

Ross
 
T

TimPGade

Hi Ross,

The prolem I am having is that I am loading NUll dates from MSAccess (for
example DateComplete) into a secondary DOM and copying the values into the
main datasource. When I try to submit the form the datepicker wants a
datevalue for these fields. I will have to revisit this to outline the
specific steps I am taking.

Tim
 
Top