zhangxc 5 years ago
parent
commit
7c6bb6b602
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/js/qcListCopy.js

+ 3 - 1
src/js/qcListCopy.js

@@ -196,11 +196,13 @@ $(".abnormalClear").on("click", function(e){
     // $('#datepicker').val('')
     // $('#datepicker2').val('')
     //默认日期为近一个月
+    let year = new Date().getFullYear()
+    let month = new Date().getMonth() + 1
     $( "#datepicker" ).datepicker({
         changeMonth: true,
         changeYear: true,
         dateFormat:"yy/mm/dd",
-    }).datepicker( "setDate", "-6d");
+    }).datepicker( "setDate", new Date(`${year}-01-01`));
     $( "#datepicker2" ).datepicker({
         changeMonth: true,
         changeYear: true,