How to understand the time components encapsulated by element?

               <el-date-picker size="small"   
                 v-model="dateInRange"
                 type="daterange"
                 align="right"
                 unlink-panels
                 range-separator=""
                 :start-placeholder="defaultBegDataName"
                 :end-placeholder="defaultEndDataName"
                 :picker-options="pickerOptions"
                  value-format
                  :default-value="new Date().getTime()-2592000000"
                  style="margin-left: 0px;width:486px"
              >
              </el-date-picker>
              pickerOptions: {
                shortcuts: [{
                  text: "",
                  onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - (3600 * 1000 * 24 * 7));
                    picker.$emit("pick", [start, end]);
                  }
                }, {
                  text: "",
                  onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - (3600 * 1000 * 24 * 30));
                    picker.$emit("pick", [start, end]);
                  }
                }, {
                  text: "",
                  onClick(picker) {
                    const end = new Date();
                    const start = new Date();
                    start.setTime(start.getTime() - (3600 * 1000 * 24 * 90));
                    picker.$emit("pick", [start, end]);
                  }
        }]
      },
Apr.02,2021

I don't quite understand what you mean. Can you ask questions about what you don't understand in detail?


I think the code sample given by element UI is easy to understand. Print more and read the document carefully.

Menu