API Controls API Controls - 1 year ago 81
jQuery Question

Change Date Format Of Jquery Datepicker

I want to change the date format to

currently the date format of my jquery calender extender is 'MM-dd-yyyy'

below is my

<input class="inputDate" formated="true" id="inputDate" value="12/12/2008" />

and i tried the following function to change the date format but it is not working

var date = $('#inputdate').datepicker({ dateFormat: 'dd-mm-yy' }).val();

Answer Source
<!doctype html> <html lang="en">    <head>
      <meta charset="utf-8">
      <title>jQuery UI Datepicker functionality</title>
      <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
      <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
      <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
      <!-- Javascript -->
         $(function() {
            $( "#datepicker-3" ).datepicker({
               altField: "#datepicker-4",
               altFormat: "DD, d MM, yy"
      </script>    </head>    <body>
      <!-- HTML --> 
      <p>Enter Date: <input type="text" id="datepicker-3"></p>

   </body> </html>

Hey Brother Try This TextBox From Jquery-UI

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download