The key to the format of the date is in the regular expression. For standard
format mm/dd/yyyy is is:
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
For your yyyy-mm-dd format you need to edit this to match them the other way
round. You will also need to change way the results[] array is populated so it
gets the right values in the right places.
I would help more but I am quite busy. Also, it's important that you learn
what's going on in the code for yourself, as I'm sure you'll appreciate.
If I get more time soon I will try and get round to changing the code to cater
for other formats and post a response here.
Ib,
The key to the format of the date is in the regular expression. For standard format mm/dd/yyyy is is:
var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{4})$/;
For your yyyy-mm-dd format you need to edit this to match them the other way round. You will also need to change way the results[] array is populated so it gets the right values in the right places.
I would help more but I am quite busy. Also, it's important that you learn what's going on in the code for yourself, as I'm sure you'll appreciate.
If I get more time soon I will try and get round to changing the code to cater for other formats and post a response here.
Jake