1
I am creating a site where I have a datapicker using the following website I wanted when I was going to save to fetch the date that was chosen from the datapicker that appears instead of the date of the textbox.
1
I am creating a site where I have a datapicker using the following website I wanted when I was going to save to fetch the date that was chosen from the datapicker that appears instead of the date of the textbox.
0
Good afternoon, below is a code that may be what you are looking for. The code besides showing the formatted date in the "datepicker" field in "Alternate" it shows without formatting, leaves original. link to documentation: https://jqueryui.com/datepicker/#alt-field
<!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>
<script src="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>
not i intend to have at the same the dd/mm/yyyy but instead of being passed by string be passed by . date, . getdate or something like that pass the date
You have already looked in the documentation if the function passes "Date", I believe it already passes as string and so you will have to convert when sending your data...
and convert by Tryparse?
Yes, because it will convert to the application site... English, French, Brazil.... no and that’s what you want?
Browser other questions tagged asp.net vb.net date datepicker textbox
You are not signed in. Login or sign up in order to post.
Good morning, when loading your page the Datepicker already load setando the text that it will manipulate, then you will have to take the data of this text... your doubt is the same?
– Wellington Araujo
I don’t know what you mean
– José Gomes
You’ve already implemented Datepicker in your project?
– Wellington Araujo
already implemented the above site
– José Gomes
and you are storing in a correct Textbox?
– Wellington Araujo
yes. But I don’t want to convert what is in the textbox because it will be a string and then changes the date according to the country. wanted to take the date of the calendar itself and not the textbox
– José Gomes
Gives somehow to fetch the value of the calendar that appears when you click on the textbox?
– José Gomes
Possible duplicate of receive date from the datapicker as a Date
– novic