Browse Source

Fix single date selection

2xB 1 year ago
parent
commit
4da6eab21e
1 changed files with 1 additions and 2 deletions
  1. 1 2
      viewer/archive/archiveviewer.js

+ 1 - 2
viewer/archive/archiveviewer.js

@@ -275,11 +275,10 @@ class ArchiveView {
         var date_to_obj = new Date(date_from)
         date_to_obj.setDate(date_to_obj.getDate() + 1)
           // Works also across months, years
-        var date_to = date_to_obj.toLocaleDateString('en-ca')
+        var date_to = date_to_obj.toJSON().slice(0, 10);
         
         this.range_from.value = date_from + "T00:00"
         this.on_range_from_selected()
-        
         this.range_to.value = date_to + "T00:00"
         this.on_range_to_selected()
     }