Fix date label

Closes SCI-3226
This commit is contained in:
Jure Grabnar 2019-03-29 08:18:15 +01:00
parent 88b4ca0798
commit e8a4fd5360

View file

@ -199,13 +199,14 @@ $(function() {
updateRunning = false; updateRunning = false;
GlobalActivitiesUpdateTopPaneTags(); GlobalActivitiesUpdateTopPaneTags();
reloadActivities(); reloadActivities();
resetHotButtonsBackgroundColor();
}); });
$('#calendar-to-date').on('dp.change', function(e) { $('#calendar-to-date').on('dp.change', function(e) {
var dateContainer = $('.ga-side .date-selector.filter-block'); var dateContainer = $('.ga-side .date-selector.filter-block');
if (!updateRunning) { if (!updateRunning) {
$('#calendar-from-date').data('DateTimePicker').minDate(e.date); $('#calendar-from-date').data('DateTimePicker').minDate(e.date);
dateContainer[0].dataset.periodSelect = $('#calendar-from-date').val() + ' - ' + $('#calendar-to-date').val(); dateContainer[0].dataset.periodSelect = $('#calendar-to-date').val() + ' - ' + $('#calendar-from-date').val();
GlobalActivitiesUpdateTopPaneTags(); GlobalActivitiesUpdateTopPaneTags();
reloadActivities(); reloadActivities();
resetHotButtonsBackgroundColor(); resetHotButtonsBackgroundColor();
@ -216,7 +217,7 @@ $(function() {
var dateContainer = $('.ga-side .date-selector.filter-block'); var dateContainer = $('.ga-side .date-selector.filter-block');
if (!updateRunning) { if (!updateRunning) {
$('#calendar-to-date').data('DateTimePicker').maxDate(e.date); $('#calendar-to-date').data('DateTimePicker').maxDate(e.date);
dateContainer[0].dataset.periodSelect = $('#calendar-from-date').val() + ' - ' + $('#calendar-to-date').val(); dateContainer[0].dataset.periodSelect = $('#calendar-to-date').val() + ' - ' + $('#calendar-from-date').val();
GlobalActivitiesUpdateTopPaneTags(); GlobalActivitiesUpdateTopPaneTags();
reloadActivities(); reloadActivities();
resetHotButtonsBackgroundColor(); resetHotButtonsBackgroundColor();