On Jan 15, 2008 2:05 PM, Brady Mitchell <mydarb@xxxxxxxxx> wrote: > > I'm having users enter dates in MM-DD-YYYY format. is there a way > > to check if what they have entered is invalid (like if they enter > > 1-15-2008 instead of 01-15-2008) ? > > Why not use something like http://www.dynarch.com/projects/calendar/ > to make it easier for the users? Along with being easier, the widget > will format the input however you like. You can even have it displayed > to the user in one format and post it to your form in another format. > > Of course there should also be an alternative method for those with > JS turned off, but my experience with users entering dates by hand has > been way too painful not to use a JS calendar widget. > > Just my two cents, > > Brady As a programmer, I tend to agree. However, I've worked with enough people who felt that the time required to move your hand from the keyboard to a mouse, click on what you want, and move back to the keyboard to continue entering data on the form took too long to be productive. This can be especially true for calendar widgets when you have to change years. (Try a calendar widget for birthdate field or something where you may have to set the year back more than 20 -- especially if the GUI designer only made buttons to scroll 1 month/year at a time.) Thinking back, I worked at one place about 8 years ago that had a regular Windows based GUI for the billing system. I was surprised to walk into a training class and see the instructor teaching the new hires how to enter information in the screens without using the mouse at all. (She hid the mice so they didn't have a choice.) On one of the last projects I worked on, we made all of our date fields with the popup calendars and made several of the text fields readonly (because we wanted users to use the calendars so we could reduce entry errors). After a while, we had so many requests to make the fields editable again that we did just that. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php