Commit e70dbd7f authored by Bengfort's avatar Bengfort
Browse files

Merge branch 'switch-to-vanillajs-datepicker' into 'master'

switch to vanillajs-datepicker

See merge request !17
parents b2f12f2c 04f8b845
Pipeline #10551 passed with stages
in 2 minutes and 54 seconds
......@@ -3,7 +3,6 @@
"version": "1.0.0",
"dependencies": {
"bootstrap": "^4.6.0",
"bootstrap-datepicker": "^1.9.0",
"jquery": "^3.6.0"
"vanillajs-datepicker": "^1.1.4"
}
}
......@@ -147,12 +147,12 @@
document.querySelectorAll('[type="date"]').forEach(function(e) {
if (e.type !== 'date') {
$(e).datepicker({
new Datepicker(e, {
format: 'yyyy-mm-dd',
language: document.documentElement.lang,
autoclose: true,
calendarWeeks: true,
daysOfWeekHighlighted: '0,6',
daysOfWeekHighlighted: [0, 6],
todayHighlight: true,
});
}
......
......@@ -9,7 +9,7 @@
<title>{% block title %}{{ TITLE }}{% endblock %}</title>
<link rel="shortcut icon" type="image/x-icon" href="{% static 'images/favicon.ico' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'vanillajs-datepicker/dist/css/datepicker.min.css' %}" />
<link rel="stylesheet" type="text/css" href="{% static 'style.css' %}" />
</head>
<body>
......@@ -41,8 +41,8 @@
<script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
<script src="{% static 'jquery/dist/jquery.min.js' %}"></script>
<script src="{% static 'bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js' %}"></script>
<script src="{% static 'bootstrap-datepicker/dist/locales/bootstrap-datepicker.de.min.js' %}"></script>
<script src="{% static 'vanillajs-datepicker/dist/js/datepicker.min.js' %}"></script>
<script src="{% static 'vanillajs-datepicker/dist/js/locales/de.js' %}"></script>
<script src="{% static 'utils.js' %}"></script>
{% block extra_scripts %}{% endblock %}
</body>
......
......@@ -113,12 +113,11 @@ NPM_FILE_PATTERNS = {
'bootstrap': [
'dist/css/bootstrap.min.css',
],
'bootstrap-datepicker': [
'dist/css/bootstrap-datepicker3.min.css',
'dist/js/bootstrap-datepicker.min.js',
'dist/locales/bootstrap-datepicker.de.min.js',
'vanillajs-datepicker': [
'dist/css/datepicker.min.css',
'dist/js/datepicker.min.js',
'dist/js/locales/de.js',
],
'jquery': ['dist/jquery.min.js'],
}
BOOTSTRAP4 = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment