NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: rupertvz on November 23, 2011, 07:05:39 AM

Title: Date (Min-date & Max-date)
Post by: rupertvz on November 23, 2011, 07:05:39 AM
Hi Guys,

In a NetWebForm I have a date field, with a min-date & max-date value.
Thus the user could only select a date range between these two values.

The date-field validations are off.  Thus when the dates are empty, or should be able to accept with 'zero' dates. 

However, it always require a date within the limits, even when the validation for the field is off.
Is there a way to make this work?
Title: Re: Date (Min-date & Max-date)
Post by: Bruce on November 23, 2011, 11:55:57 PM
Hi Rupert,

>> The date-field validations are off.  Thus when the dates are empty, or should be able to accept with 'zero' dates.

I'm not sure you can turn validation off. You can turn off _immediate_ validation, but not validation overall.
If you want to accept 0 as a valid value, then I recommend you add a line of embed code to the
ValidateValue::fieldname routine.

If you look at the generated code in that routine (right click on the procedure, choose source) the line to write should be fairly obvious.

cheers
Bruce