I'm using calendar from Yahoo UI as follows:
calDate = (calDate.getMonth() + 1) + '/' + calDate.getDate() + '/' + calDate.getFullYear();
This displays a MMDDYYYY
format.
I want to change this format to YYYY-MM-DD
so that I can insert it into a MySQL database.
I changed the code to:
calDate = calDate.getFullYear() + '-' + (calDate.getMonth() + 1) + '-' + calDate.getDate();
It worked but the problem is now that when I want to change the selected date the calender doesn't display the date and instead shows NAN
.