Procházet zdrojové kódy

fix datepicker bug

tripeur před 4 roky
rodič
revize
82ab9ff67a
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      static/js/app.js

+ 2 - 1
static/js/app.js

@@ -4,12 +4,13 @@ const coinTop50 = {
       return {
         date :document.getElementById("startDate").innerText,
         items: [],
+        datepicker:null
       }
     },
     mounted() {
       this.requestData(this.date)
       const elems = document.querySelectorAll('.datepicker');
-      M.Datepicker.init(elems, {onClose:()=>{
+      this.datepicker = M.Datepicker.init(elems, {onClose:()=>{
         this.date = this.datepicker.date.toISOString().slice(0,10)
       }});
     },