Skip to content

Instantly share code, notes, and snippets.

@ahem
Created March 5, 2014 11:02
Show Gist options
  • Save ahem/9365197 to your computer and use it in GitHub Desktop.
Save ahem/9365197 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet" type="text/css" />
<meta name="description" content="datepicker" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="container">
<h1>Datepickers</h1>
<div class="form-group">
<h2>Default picker</h2>
<input value="2014-03-05" type="date" id="picker-default" class="form-control" />
</div>
<div class="form-group">
<h2>Default picker +Chrome hack</h2>
<input value="2014-03-05" type="date" id="picker-chrome-hack" class="form-control" />
</div>
<div class="form-group">
<h2>Bootstrap Date Picker</h2>
<div id="picker-bootstrap"></div>
</div>
</div>
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<script src="http://eternicode.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
</body>
</html>
$('#picker-bootstrap').datepicker({
language: "da"
});
// disable native datepicker UI in Chrome
#picker-chrome-hack {
&::-webkit-inner-spin-button,
&::-webkit-calendar-picker-indicator,
&::-webkit-clear-button {
display: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment