Click here to Skip to main content
15,908,634 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


i used simple date picker cal.js file for calendar but i want the date format like this.. yyyy-mm-dd
I changed format from

return (dateObj.getMonth() + 1) + "/" + dateObj.getDate() + "/" + dateObj.getFullYear();


to

return dateObj.getFullYear() + "-" + (dateObj.getMonth() + 1) + "-" + dateObj.getDate();


but it didn't work...
Posted
Comments
Peter_in_2780 18-Mar-12 17:19pm    
What do you mean "didn't work"? What output DID it produce? Did you clear your cache(s)?

1 solution

Please be more specific about your question.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900