Receive date from the datapicker

1

I'm creating a site where I have a datapicker with the following site I wanted it to save when fetching the date that was chosen from the datapicker that appears instead of the date of the textbox.

    
asked by anonymous 02.05.2018 / 13:03

1 answer

0

Good afternoon, follow below a code that possibly is what you are looking for. The code besides showing the date formatted in the field "datepicker" in the "alternate" it shows without formatting, leaves original. link to documentation: link

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Datepicker - Populate alternate field</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="/resources/demos/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#datepicker" ).datepicker({
      altField: "#alternate",
      altFormat: "DD, d MM, yy"
    });
  } );
  </script>
</head>
<body>
 
<p>Date: <input type="text" id="datepicker">&nbsp;<input type="text" id="alternate" size="30"></p>
 
 
</body>
</html>
    
02.05.2018 / 18:48