el-date-picker 时间日期格式

时间日期格式: 选择当前月前一年的时间范围:

<el-date-picker 
 v-model="pageList.monthrange" 
 type="monthrange" 
 range-separator="至" 
 format="yyyy-MM" 
 value-format="yyyy-MM" 
 start-placeholder="开始月份" 
 end-placeholder="结束月份" 
 :picker-options="pickerOptions"
></el-date-picker>

 pickerOptions: {
  disabledDate: (time) => {
    return time.getTime() < Date.now() - 365 * 24 * 60 * 60 * 1000 || time.getTime() > Date.now(); // 返回 所有时间 大于 当前时间
  }
 },

// 时间禁用范围: 


版权声明:本文为weixin_45677987原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。