Skip to content

Instantly share code, notes, and snippets.

@stevepiercy
Last active September 18, 2015 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevepiercy/f2f33c370ec781e7ef87 to your computer and use it in GitHub Desktop.
Save stevepiercy/f2f33c370ec781e7ef87 to your computer and use it in GitHub Desktop.
bootstrap-datepicker - After cloning https://github.com/eternicode/bootstrap-datepicker place index.html in the directory and load it
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Datepicker for Bootstrap</title>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<link id="bs-css" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link id="bsdp-css" href="dist/css/bootstrap-datepicker3.min.css" rel="stylesheet">
</head>
<body>
<input type="text" class="form-control">
<script src="dist/js/bootstrap-datepicker.js"></script>
<script>
$('input').datepicker({
format: "yyyy-mm-dd",
startDate: "-1y",
endDate: "0d",
todayBtn: "linked",
autoclose: true,
todayHighlight: true
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment