Jump to content

Check Date Is In Past


Guest haverer

Recommended Posts

Guest haverer

Hi there, Been using the site for a while with no probs. Stubled across something I can't work out though, and wondering if anyone can help me. On a form I have a date box. I would simply like to varify that the date entered is a date in the past or today, and not a date in the future. Does anyone have any suggestions?Thanks. lul

Link to post
Share on other sites

google "javascript date validation" and you'll be sure to find something that works.however, this implies that the validation, with respect to not in the future, would rely on the clients PC time. so, very simply, I could change my computer date to a time in the future to trick the script. Or, if I really wanted to, just turn off javascript and have it ignore it all together.having said that, you should really run validation on both sides, client and server. this would mean that you would need php, asp, or cold fusion to make sure the information passed to the server is valid before doing anything with it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...