Friday, 29 July 2022

Jquery Ui datepicker foram in yyy-mm-dd

 <!DOCTYPE html>

<html>


<head>

<title>

jQuery UI datepicker format dd/mm/yyyy

</title>

<link type="text/css" href=

"https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"

rel="stylesheet" />

<script type="text/javascript"

src="https://code.jquery.com/jquery-1.12.4.js">

</script>

<script type="text/javascript" src=

"https://code.jquery.com/ui/1.12.1/jquery-ui.js">

</script>


<style type="text/css">

.ui-datepicker {

font-size: 8pt !important

}


body {

text-align: center;

background-color: lightgray;

}

</style>

</head>


<body>

<h2 style="color:green">

</h2>

<form id="form1" runat="server">

<div class="demo">

<b>Date:</b> <input type=""

name="" id="txtDate" runat="server" />

</div>


<script type="text/javascript">

$(function () {

$("#txtDate").datepicker({

dateFormat: 'yy/mm/dd'

});

});

</script>

</form>

</body>


</html>


output:



No comments:

Post a Comment