Re: Validate a date ? - Illustra Web Blade
Posted in 1997
moore <mmoore@antares.Tymnet.COM> writes: >I am using Illustra with Web Data Blade. It seems that there is >no easy way to accept a date from a web page and determine >if it is a valid date. (Apply a date edit). >I would expect a $(ISDATE,value) function but there is none. >Also there seems to be no date validation function in the >Illustra User's Guide. >Am I missing something? It seems to me that this is pretty >basic! What is the best way to validate a date. I don't have manuals in front of me, but I don't recall any such function. I assume you want to validate a date that was entered in an HTML form field. Unless you constrain the format to a canonical (standard) format, an ISDATE-type functions wouldn't work anyway. But let's assume that the entered date is in a format you can handle -- for instance, you might have used separate fields for day, month, and year. I can think of two ways to validate the date. The first is to use a JavaScript function that reacts to an onSubmit or onChange event. The second is to compare whatever date was entered with valid upper- and lower-bound dates. If the date isn't in a certain range or if the comparison operation barfs then you can reject the entered value. Seth -- Seth Grimes -- grimes@access.digex.net -- http://www.access.digex.net/~grimes grimes@magnet.com -- http://www.magnet.com