jackgoddy123 Posted January 17, 2014 Share Posted January 17, 2014 Hello, I have the below code with generate date format calender. It properly works for mm/dd/yy format <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Datepicker - Default functionality</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> <script> $(function() { $( "#datepicker" ).datepicker(); }); </script> </head> <body> <p>Date: <input type="text" id="datepicker"></p> </body> </html> But i want datepicker in dd/mm/yy format. i.e 24/01/14 (dd/mm/yy) format Can some one help me out. I am quite stuck. Any kind of help is appreciated. Link to comment https://forums.phpfreaks.com/topic/285453-datepicker-in-mmddyy-format/ Share on other sites More sharing options...
mac_gyver Posted January 17, 2014 Share Posted January 17, 2014 i'm betting this is covered in the documentation. have you consulted the documentation? Link to comment https://forums.phpfreaks.com/topic/285453-datepicker-in-mmddyy-format/#findComment-1465597 Share on other sites More sharing options...
Barand Posted January 20, 2014 Share Posted January 20, 2014 A couple of minutes Googling gave $(function() { $( "#datepicker" ).datepicker({dateFormat: 'dd/mm/y'}); }); However, I prefer to use "d-M-y" format for datepickers. It's unambiguous about which is the month and which is the day (unlike 04/05/14) and it still works fine with strtotime() unlike d/m/y format Link to comment https://forums.phpfreaks.com/topic/285453-datepicker-in-mmddyy-format/#findComment-1465862 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.