Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all ,

Am using datepicker in jsquery, if i select the date it shows month/date/year.


But i need to show date/month/year format.it is possible to change the format in the same datepicker,if it is mean How can i change in javascript ,



Thanks in advance<big></big>
Posted

This should have been much simpler and less efforts in getting this done, if you had looked into the code yourself, rather than posting this question here.
 
Share this answer
 
 
Share this answer
 
Comments
priya from Madras 20-Jan-12 4:28am    
Thanks ChandraShekar,its working
chandrashekhar racharla 20-Jan-12 4:54am    
Welcome priya
In javascript there is no build in function for format the date. You need to do it mannualy.
Eg: var dt= "01/05/2009"
var arrDt = dt.split('/')
alert(arrDt[1] + "/" + arrDt[0] + "/" + arrDt[2])
 
Share this answer
 
its working fine,

$(function() {
$("#datepicker").datepicker({dateFormat: 'yy-mm-dd'});
});

Thanks all
 
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