Jump to content

Search the Community

Showing results for tags 'date validation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. Hello, I need the help on the following in order to validate date on my form (validation is onBlur): - validation on form date format: dd-mm-yyyy , when I go to next field, if the date field is empty, it will be filled with today's date, and I write 9-3 and go to next field it will automatically write 9-3-2013 (where is 2013 is the current year), finally, if the date is not valid then user can't go to another field, focus must be go back to date field. Help is much appreciated. Thanks in advance
  2. i've a form user can enter any date , but i want to set a date range validation so the user can't add a date not in this range . for example: from 1-12-2012 to 1-1-2013 , so if user enter 2-1-2013 the system shouldn't accept it.. i've tried this javascript code but it doesn't work and doesn't give me any alert message even when date not in range .. can you help me with this ? or suggest other javascript code i can use instead this is part of my form : echo "<th> Date </th> <td> <input type='date' name='v2' value='' ></td>"; and this is the javascript code i've used <script language="javascript"> function validation(form) { var v2 = document.getElementById('v2'); var date = v2.value; if ( (v2 > new date('12/12/2012')) && (v2 < new date('1/1/2013')) ){ // date is in your valid range return true; } else { // date is not in your valid range alert("date is not in valid range") return false; } } </script>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.