Add flatpickr HTML datetime picker.
This commit is contained in:
parent
12acc50d5a
commit
05871a7ddf
4 changed files with 29 additions and 0 deletions
14
drakul/base/static/css/flatpickr.min.css
vendored
Normal file
14
drakul/base/static/css/flatpickr.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
drakul/base/static/js/flatpickr.min.js
vendored
Normal file
2
drakul/base/static/js/flatpickr.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,3 +14,14 @@ function getCookie(name) {
|
||||||
}
|
}
|
||||||
return cookieValue;
|
return cookieValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$(".datetimeinput").flatpickr({
|
||||||
|
enableTime: true,
|
||||||
|
allowInput: true,
|
||||||
|
time_24hr: true,
|
||||||
|
defaultHour: 20,
|
||||||
|
locale: {
|
||||||
|
firstDayOfWeek: 1,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<title>{% block title %}Base{% endblock %} | {{ request.site.name }}</title>
|
<title>{% block title %}Base{% endblock %} | {{ request.site.name }}</title>
|
||||||
|
|
||||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css">
|
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css">
|
||||||
|
<link rel="stylesheet" href="{% static 'css/flatpickr.min.css' %}" type="text/css">
|
||||||
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
|
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css">
|
||||||
</head>
|
</head>
|
||||||
<body class="d-flex flex-column h-100 bg-light">
|
<body class="d-flex flex-column h-100 bg-light">
|
||||||
|
@ -60,6 +61,7 @@
|
||||||
<script src="{% static 'js/jquery.slim.min.js' %}"></script>
|
<script src="{% static 'js/jquery.slim.min.js' %}"></script>
|
||||||
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
<script src="{% static 'js/bootstrap.bundle.min.js' %}"></script>
|
||||||
<script src="{% static 'js/interact.min.js' %}"></script>
|
<script src="{% static 'js/interact.min.js' %}"></script>
|
||||||
|
<script src="{% static 'js/flatpickr.min.js' %}"></script>
|
||||||
<script src="{% static 'js/main.js' %}"></script>
|
<script src="{% static 'js/main.js' %}"></script>
|
||||||
{% block scripts %}{% endblock scripts %}
|
{% block scripts %}{% endblock scripts %}
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in a new issue