NetTalk Central

Author Topic: Date (Min-date & Max-date)  (Read 2653 times)

rupertvz

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
    • Email
Date (Min-date & Max-date)
« 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?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Date (Min-date & Max-date)
« Reply #1 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