From ec5b2e4815048de561bf2234f4b7fef6ba6761d7 Mon Sep 17 00:00:00 2001
From: Valentin <valentin.pocotilenco>
Date: Mon, 18 Oct 2021 20:38:59 +0300
Subject: [PATCH] disabled useless dates. formatted date.

---
 web/eccs.js | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/web/eccs.js b/web/eccs.js
index 1bb7d02..fd6e4c6 100644
--- a/web/eccs.js
+++ b/web/eccs.js
@@ -271,13 +271,14 @@ function format(d) {
 $(document).ready(function() {
 
     $("#datepicker").daterangepicker({
+        locale: {
+            format: "YYYY-MM-DD",
+            separator: "<>"
+        },
         opens: 'left',
-        todayHighlight: 'TRUE',
-        autoApply: false,
-        defaultDate: new Date()
-    }, function(start, end, label) {
-        dateFrom = start.format('YYYY-MM-DD');
-        dateTo = end.format('YYYY-MM-DD');
+        minDate: moment().subtract(7, "days"),
+        maxDate: new Date(),
+        defaultDate: new Date(),
     }).on('apply.daterangepicker', function(ev, picker) {
         getPastResults()
     });
-- 
GitLab