Skip to content
Snippets Groups Projects
Commit 0e51edbc authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '208-add-possibility-to-select-date-in-daily-planning' into 'master'

Resolve "add possibility to select date in daily planning"

Closes #208

See merge request NCER-PD/scheduling-system!131
parents ca399839 0753042f
No related branches found
No related tags found
1 merge request!131Resolve "add possibility to select date in daily planning"
Pipeline #
......@@ -237,6 +237,22 @@ $(document).ready(function () {
groupByResource: true,
height: "auto",
customButtons: {
datePickerButton: {
text: 'select',
click: function () {
var $btnCustom = $('.fc-datePickerButton-button');
if ($(".calendar-datepicker").length > 0) {
$(".calendar-datepicker").remove();
}
else {
$btnCustom.after('<div class="calendar-datepicker"/>');
$(".calendar-datepicker").datepicker().on('changeDate', function (ev) {
$('#calendar').fullCalendar('gotoDate', ev.date);
$(".calendar-datepicker").remove();
});
}
}
},
save: {
text: 'Save',
click: function () {
......@@ -333,7 +349,7 @@ $(document).ready(function () {
},
header: {
left: 'prev,next today',
center: 'title',
center: 'title, datePickerButton',
right: 'save, clear, toPdf'
},
droppable: true,
......
......@@ -13,6 +13,7 @@
/>
<link rel="stylesheet" href="{% static 'fullcalendar-scheduler/scheduler.min.css' %}">
<link rel="stylesheet" href="{% static 'css/daily_planning.css' %}">
{% include "includes/datepicker.css.html" %}
{% endblock styles %}
{% block ui_active_tab %}'daily_planning'{% endblock ui_active_tab %}
......@@ -48,6 +49,7 @@
var resources_url = '{% url 'web.api.workers' %}';
var events_url = '{% url 'web.api.events_persist' %}';
</script>
{% include "includes/datepicker.js.html" %}
<script src="{% static 'js/daily_planning.js' %}"></script>
<script src="{% static 'jspdf.min.js' %}"></script>
<script src="{% static 'html2canvas/html2canvas.min.js' %}"></script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment