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.
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.
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"> <input type="text" id="alternate" size="30"></p>
</body>
</html>