How to validate date in YYYY-MM-DD format using javascript

Home Forums Question related to programming How to validate date in YYYY-MM-DD format using javascript

This topic contains 1 reply, has 1 voice, and was last updated by  Raj 3 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #668

    sunil dubey

    How to validate date in YYYY-MM-DD format using Javascript.

    I want to know how to validate the date format through javascript. I have one input field in which i want that date should be validated on onblur event through js. Validation should be done in YYYY-MM-DD format.

    #669

    Raj

    You can validate date format by using Regex in Javascript

    Complete Date Format Validation Tutorial

    Learn Basics of Regex

    Javascript

    On onBlur event it checks for YYYY-MM-DD format. If it not find the correct format the it shows the alert.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Comments are closed.