Fix JS error.

This commit is contained in:
James Cole 2015-12-11 18:32:57 +01:00
parent 938581527e
commit e26d797d57

View File

@ -5,16 +5,19 @@ $(function () {
"use strict";
drawChart();
picker = $('#inputDateRange').daterangepicker(
{
locale: {
format: 'YYYY-MM-DD',
firstDay: 1,
},
minDate: minDate,
drops: 'up',
}
);
if ($('#inputDateRange').length > 0) {
picker = $('#inputDateRange').daterangepicker(
{
locale: {
format: 'YYYY-MM-DD',
firstDay: 1,
},
minDate: minDate,
drops: 'up',
}
);
}
// set values from cookies, if any:
if (readCookie('report-type') !== null) {