• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Validating the date format

Validating the date format

There are plans to adapt the jQuery UI Datepicker widget for use in a jQuery Mobile site. At the time of this writing, the widget was still highly experimental. When a stable version becomes available, you might prefer to use it instead of the following solution, which checks only the date format, not the validity of the date.

This solution uses a complex regular expression. Copying regular expressions from printed books often leads to mistakes, so I suggest that you copy the code for the regex from reservations_date.html in ch06/complete.


You are currently reading a FREE PREVIEW of this book.

Sign-up to get instant access to over
$1 million worth of books and videos.

Start a Free Trial