My question is similar to Remove Leading "0" in day of month SimpleDateFormat
Is it possible to remove the leading "0" in jquery UI datepicker?
The DateFormat option is as close as I could get from the documentation:
$( ".selector" ).datepicker({ dateFormat: "yy-mm-dd" });
But what I need is on a date like Dec 5th, 2012, datepicker shows it as 12/05/2012 whereas I would like to have 12/5/2012. Same goes for April 5th: 4/5/2013 for example.
Can this be done without an extensive logic?
Try
$( ".selector" ).datepicker({ dateFormat: "yy-m-d" });
Source:Jquery DateFormats
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With