Skip to content

Instantly share code, notes, and snippets.

@henideepak
Last active November 1, 2017 07:29
Show Gist options
  • Save henideepak/618890794330dd97925d49f3872c7c2f to your computer and use it in GitHub Desktop.
Save henideepak/618890794330dd97925d49f3872c7c2f to your computer and use it in GitHub Desktop.
datepicker
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery UI Datepicker - Display month &amp; year menus</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link rel="stylesheet" href="bootstrap-datepicker.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 src="bootstrap-datepicker.min.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
format: "mm/dd/yyyy",
autoclose: true,
todayBtn: true,
calendarWeeks: true,
autoclose: true,
todayHighlight: true,
toggleActive: true
});
} );
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment