How to validate Date using Javascript Regular Expression




Here is a simple Javascript function to validate a date in US format.

function isDateValid(date) {
	//RegEx to validate date
	/*
	* ^[0-1][1-2] : The month starts with a 0 or 1 followed by either a 1 or a 2
	* [- / ]?: Followed by  an optional "-" or "/".
	* (0[1-9]|[12][0-9]|3[01]) : The day part must be either between 01-09, or 10-29 or 30-31.
	* [- / ]?: Day part will be followed by  an optional "-" or "/".
	* (18|19|20|21)\\d{2}$ : Year begins with either 18, 19, 20 or 21 and ends with two digits.
	*/
	var dateRegExPattern = "^[0-1][1-2][- / ]?(0[1-9]|[12][0-9]|3[01])[- /]?(18|19|20|21)\\d{2}$";
	if(date.match(dateRegExPattern)){
		return true;
	}else{
		return false;
	}
	
}


If you enjoyed this post, make sure you subscribe to my RSS feed!

543 Thoughts on “How to validate Date using Javascript Regular Expression

  1. By following the steps that are shown below you can find a Usb Wi-Fi antenna and employ your Net connection effortlessly.
    There are even some antennas marketed as “smart” when all these are is
    regular antennas so be very careful. Audiovox –
    outdoor hdtv antenna deals antenna model ant751 Another way for one to determine which specific area within the room has the most effective TV reception would
    be to carry the antenna and move it across the room.

    There are very different factors that will determine what Hdtv is perfect for you.
    Study the features of HDTVs and produce a list of feature you like in a television.

  2. Jewls, who simply continues using the lesson, saying Sharie should be learning a
    great deal and that she wishes the other children were
    a lot more like Sharie. Sell off vacations This Engadget Palm Pre 2
    application can help you keep around date with release dates for upcoming tech,
    in addition to critic and reader reviews, and hands-on demos with the latest gadgets.

    Once we were inside air, I discovered more fun solutions to keep myself occupied within my assigned
    seat. At Nicci Beach you are able to take part in day club and night club on Sundays, and groove with talented dancers enjoying with African drinks.

    ?They can maybe even do significantly better in comparison to regular office work on the
    subject of earning opportunities. last minute southwest flights spirit airlines But the most up-to-date law news will help you to trigger these
    communications start by making businesses aware about legal developments that
    might impact a company or perhaps an industry.

  3. The newest security devices will that thieves should have a hard time getting into your home.
    Home security can be as much a situation of mind as it truly is an installation of a top-tech security systems system.
    Home security motion camera There are various wireless and network security
    systems cameras for you from which to choose.

    Most police officials recommend homes and businesses install a
    alarm system. CCTV is really a form of surveillance system that
    could be installed and implemented at any home or workplace for additional security.

    ?Would you would like to draw in potential customers from around the planet.

    however home security using iphone Authors and publishers too are enjoying their books to become published in digital format.

  4. De la o vârst? fraged?, am fost interesat de informatic?,
    a se vedea gândurile mele pe ea! V? rug?m s? citi?i blog-ul meu!

  5. My spouse and I absolutely love your blog and find many of your post’s to be precisely
    what I’m looking for. Does one offer guest writers to
    write content for you? I wouldn’t mind creating a post or elaborating on many of the subjects you write regarding here.
    Again, awesome weblog!

  6. The KINTREX SCL0625 Digital Kitchen Scale has a good set many cups 100 grams of sugar features, including touch-based buttons.
    Palmer is a Pennsylvania based candy company with product lines that include NASCAR and Marvel Comics.
    Fluid ounces to pounds

  7. The Uniden UDW20055 also may include security surveillance software.
    All security containers and documents have to be processed and properly marked, this
    also a task assistants carry out. The current prevalence of
    malicious software and much more determined intruders, have ended in numerous network security software programs, from free programs to paid versions.

    Remote viewing from any java enabled browser is
    a plus, and with all the ability to password protect the digital camera,
    the possibilities of unauthorized viewing
    ought to be minimal. Now, the rate in the Wireless Home security cameras tulsa
    Cameras can also be achieveable for the common consumer, and you can flourishingly replace the pricey and
    annoying alarm.

  8. ????????????????????????????????????????
    00:00??Juice=Juice???????KISS?(MV)
    ??????????????????????????

    ?The impact of media in this social lives exhibits the planned functions, in addition to
    upgrading entire world together with the world news which include Tamilnadu news together with latest news.
    ???????? ????? ?? A radio show,
    live show along with a number of books a few of his responsibilities, in addition for the TV show.

  9. It means you may own a digital camera with multi-function as well as a silicone diving mask at the same time
    equally to your spent about the waterproof housing of ordinary
    camera. Life – Proof Gen 2 waterproof i – Phone
    4S case will come in 4 colors, including pink, purple, white and black,
    each are priced at $79. waterproof camera or camcorder cameras group test 2012 Almost every mobile phone
    produced today they form a camera.

    The Over – Board waterproof case for Motorola Droid X is
    super thin measuring only 0. I was exceptionally camera shy (still am), plus it
    seems that everyone was approximately the challenge of obtaining a picture of me when I was older and can go into hiding.

  10. cctv keyboard cameras present you with a safety blanket to
    some people and provide you with the confidence that someone is
    usually watching over you. You can opt change your wireless CCTV to
    own local recordings. Cctv usa The initial thing to do so as to tackle the multiple choice questions
    in Home security systems certification exam would be to prepare well.

    These top quality monitoring systems besides benefit the outside of your property or property but the inside, to guarantee the lowered chance vandalism and crime.

    Safe Eyes is such as a complete monitoring tool that can help you stay aware of what your entire child does,
    when online.

  11. Whey protein is often a by-product from the cheese manufacturing process, and constitutes the solids which are left when cow’s milk has coalesced into cheese.
    I also started seeing more Vegan protein powders that piqued my curiosity.

    Protein powder denatured This is frequently
    the reason why it really is very important for bodybuilders
    to consider protein supplements, as otherwise the muscles is not going to be repaired, and also the day’s being active is pointless.

    As per scientific observations there are not any instances of side-effects while using Dymatize
    powder. Isolate form, which remains after the elimination of fat
    and lactose from concentrate, is 90 percent protein powder cookbook by weight.

  12. However, some natural aids like fruits can also be useful to your skin. phytolacca berry tablets wikipedia berry’s
    mother tincture side effects And you are able to remotely build music downloads from
    your desktop library; they’re going to initiate when you
    return to your home Wi-Fi® or connect via USB.

    It is, however, crucial that you first understand why it
    is that the heel is paining you. Don’t utilize a container which was earlier employed to hold
    held any chemicals or caustic substances.

  13. At Cooling Castle Barn the wedding ceremony can either take place outside under the
    gazebo, as detailed above, or in the bespoke ceremony barn.
    The Pacific Ocean will be on the right-hand side for almost the entire trip.
    The mini figures from Hogwarts Castle include,Harry Potter, Hermione Grange, Lord Voldemort,
    Albus Dumbledore, Professors Snape, Mc – Gonagall, and Flitwick, Argus Filch and his
    cat, Mrs.

  14. Dog tracks tend to have things going on to encourage people to come out to the track.

    For instance, if you win one out of three bets, you
    know that you will need to divide your money into
    at least three stakes for the day, but also figure in a losing streak.
    As the pressure of the vortices is lower than the atmospheric pressure, the atmosphere effectively pushes the car down onto the road.

  15. Growing in downloads today is ‘Flower Garden ‘ Grow Flowers’, a free app today that puts a virtual garden on your i – Phone,
    i – Pad or i – Pod Touch. 7) reports that the i – Phone app ‘Snap – Chat’ can cause your i –
    Phone to freeze and crash. The much hyped i – Phone 5 release is expected to happen sometime later this year or by 2012.

  16. Nice post. I was checking constantly this blog and
    I’m impressed! Very helpful info specifically the final section 🙂 I take
    care of such information a lot. I used to be looking for this certain information for
    a very lengthy time. Thank you and best of luck.

  17. Security in general and cctv dvr hard drive failure especially helps prevent hooligans from taking law into their particular hands and on the same time keeps criminals at bay.
    If you leave your facility and plan on having your cameras
    record while you’re gone the time will pass before you
    decide to review the footage. Cctv dvr viewer mac It is achievable to also let
    the masking system for 16 channel DVR and entry the display.

    No criminal will escape a breaking and entering situation again at your house,
    due to Cave Secure CCTV & Alarms. Sufficient evidence indicates that CCTV surveillance systems mostly discourage crimes and robberies, however, not more vicious
    crimes for example aggravated assault and rape.

  18. ???????????????????????????????
    ???????????????????????????
    ?????????????????????????

    ?Participants are further encouraged being constructive, friendly and informative.
    ?? The more funding alternatives you may have, the greater, right.

  19. Increasing protein by the maximum amount of as thirty
    percent in what you eat can assist you to build leaner muscles.
    But to get a great majority in the population, weight loss pills are just
    a simple but dangerous solution to solve a problem which includes much better solutions.

    Voyager 3 diet pills reviews Every year in excess of 70 million people resolve to
    slim down by going on dieting, which feeds the top,
    fat $58 billion diet and weight-loss industry.

    All possible negative effects of prescribed weight loss pills
    are properly documented therefore you will manage to check when the product might pose a risk in your health.
    Do not opt for every fat loss pill used by a
    star, because some celebrity-endorsed products usually are not used by celebs themselves.

    ?They had married a fortnight earlier in Mumbai, India in a very lavish Hindu ceremony that has been attended by relatives and close friends.

    Pill side effects chromium polynicotinate or picolinate It doesn’t take too long to evaluate what big, brand-name companies say during earnings season.

  20. ????????????????????? ??????????????34??????????????p(^-^)q
    ??????????????????????????????????????? ????????????????????????
    ????????? ??

    ??????????????????????????????? ??????????????????????????? ?????+
    ????????????????????????? ??????????????? ????? ??????????????????????????????????

  21. ???????????? ??? revy ???? ?????? ??? ?? ??????????????????????????????
    ??????????????????????????????…????????? ???
    ????????????????????
    ????????????????? ??
    ???????????????

    ??????????????????????????????? ?? 500??????????…
    ????????????? ??? ???? ?? ????????????????????

  22. I love this beast!

    devolro

  23. The company was originally established in 1926-based off of the success
    of Jacob Schick’s invention of an razor that used interchangeable disposable blades.
    If one happens to currently have razor bumps then you can find
    several things you’re able to do to ease your suffering.

    electric razor scooter e300 battery
    razor not charging It is quite the leading edge choice in mens shavers.

    Occam’s Razor finds widespread application in numerous fields of knowledge.
    There are numerous ways of doing away with facial hair, it’s not necessary to
    rely solely over a razor anymore.

  24. It’s a regrettable fact that this majority of females don’t know the way to give themselves an orgasms.
    Another urological application with the Pulse would be inside treatment
    of erectile dysfunction. pocket pussy I
    pussy as If i ever look at prison I want you to definitely
    send me one of such.

    Penis pumps are viewed to promote blood flow to your penis contributing to longer lasting and larger erections.
    Some people lose sight of why they even married the person in the first place.

  25. Shimla toy train journey is a fine experience if you
    want to go to this hill station using your lover or wife. On the contrary,
    you need to firstly question them why they certainly this and what they need to know after dismantling toys.
    nerf capture the flag blog When you get the sex toys it’s good to buy the toy cleaner also together with it.

    These toys may be used for inducing fun and entertainment as well as
    educating kids of most ages indiscriminately.
    While these durable toys might cost more initially,
    in the long run they are actually more cost effective because
    you buy a smaller amount of them.

  26. ?A 60,000-hour spec translates to approximately 20 many years of viewing at 8 hours per day.

    The impressive viewing angle approaches 180 degrees meaning there will not be a bad seat in the house.
    Composite vs s video

    ?For aiding crime reports, attorneys can be of great help.
    Radio shack radio shack locations During a show although eat about 1 KG of metal
    using mineral oil and taking large packages of water.

  27. There are obvious explanation why hospitals have to have a great quantity of CCTV cameras and in many
    cases people monitoring the movements near their hospital.
    You will likely be privy with their performance if you are not physically
    there to supervise them. Cctv ghost footage Security and surveillance may
    very well be the main purposes for having cctv guy cameras positioned in key locations within a space.

    Daca va pasa de performanta noapte, lumina atunci mici ar fi o alegere optima.
    The extensive usage involving CCTV security has raised concerns regarding invasion related to privacy.

  28. Red, Orange and Yellow Fruits and Vegetables – They are in a group of fruits and vegetables
    called carotenoids. Madelyn Fernstrom, in an article for MSNBCs Today, states that “the average American consumes a mere 14 15 grams to tablespoon – and many eat
    even less. Kitco

  29. As they obtain Ben 10 toys they’re swamped by different ideas
    to play with them. Offering small toys to some large bird can pose a threat of choking hazards.

    nerf slingfire dart tag And that’s because Sex Toys are a great way to
    add spice to your love life and re-ignite the previous flame.

    And yes, as compared on the other models like Vulcan, this Stampede nerf seems to have no tendency to jam.
    She explores its qualities and “benefits” deciding whether she likes the toy or not.

  30. The game has been a huge hit with iOS and Android users but it has equally
    found many frustrated users who cannot get the gold, celerium, oil or unlock all heroes, but now the solution is
    right in all users’ hands – the call of duty heroes
    hack (https://callofdutyheroeshack.wordpress.com) Tool!

  31. Morgal map is very useful for players to win in Golden Sun Dark Dawn. KENZER AND COMPANYKnights Of The Dinner
    Table Bundle Of Trouble Volume 47 TP (not verified by Diamond), $14.
    You can now download a huge collection of artists’ entire collection with the single click of the mouse and not pay a single penny.

  32. When the cells lack insulin they become starved and since there is
    no other source of energy apart from the fats, they get used up.
    Sweets, junk food, and sodas are not allowed on the DASH diet.

    Myth: Diabetics are more susceptible to the common cold and other diseases than others.

  33. Good day! I could have sworn I’ve visited this blog before
    but after looking at a few of the psychic articles
    I realized it’s new to me. Nonetheless, I’m certainly delighted I
    discovered it and I’ll be book-marking it and checking back frequently!

  34. So, as you write your article, make sure your depict
    real life stories directed toward your reader.
    Some of the most prominent advantages of going
    through online audio books are:. I walked pass the book store, or
    what use to be the book store.

  35. Thanks a bunch for shazring this with all of us you actually realize
    what you are talking about! Bookmarked. Please also talk over with my website =).
    We will hzve a link change contract between us

  36. Amazing issues here. I am very glad to look your article.

    Thank you so much and I’m having a look ahead to contact you.
    Will you please drop me a mail?

  37. Hello there! I just wish to offer you a biig thumbs up for the excellent information you’ve
    got here on this post. I will be returning to your blog for more soon.

    For ann incredible inbformative review please checkout this page:
    neuroluma

  38. Charles.Millston on November 17, 2015 at 3:47 pm said:

    M’agrada la valuosa informació que s’ofereix als seus articles. Puc marcar el seu weblog i compten amb els meus fills de prova fins aquí en general. Estic una mica positives que seran informat bastant un munt de coses noves aquí que ningú!

  39. Hello it’s me, I am also visiting this website regularly,
    this web page is really pleasant and the visitors are genuinely sharing pleasant thoughts.

  40. A great site for this is Do checked out day-to-day and do publish comments of anything you don’t comprehend.
    I can then describe more.

  41. The Globe Overall health Organization is the spot to uncover out about any certain problems that are affecting the places you may well be travelling to. Like for instance, the existing ebola virus outbreak in West Africa.

  42. I was pretty pleased to discover this great site.
    I need to to thank you for your time due to this wonderful read!!
    I definitely really liked every little bit of
    it and I have you saved as a favorite to see new stuff on your site.

  43. For instance, the amount of articles utilizing a hashtag that is
    trending right now may normally decrease the moment the big event is finished.
    Consequently, its KL rating will begin to reduce, then your hashtag won’t be trending although individuals often like after it is over to view videos and photographs from your main function of a development for a few hours.

Comment navigation

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation