undefinedfix
Sign in

Vue + element lattice date deadline

zcnfk edited in Wed, 25 Jan 2023

I want to format the date to deliver the desired date without any additional time, minutes and seconds

<el-form-item label="开始日期">
            <el-date-picker
              v-model="FingoodsBaseVO.sdate"
              type="date"
              format="yyyy-MM-dd"
              placeholder="选择日期"
              style="width: 150px"
              size="small"
            />
          </el-form-item>
          <el-form-item label="结束日期">
            <el-date-picker
              v-model="FingoodsBaseVO.edate"
              type="date"
              format="yyyy-MM-dd"
              placeholder="选择日期"
              style="width: 150px"
              size="small"
            />
          </el-form-item>

The current date format: you want to transfer it as 2020-06-22

1 Replies
floek
commented on Wed, 25 Jan 2023

Using value format

企业微信截图_15929856178364.png

<el-date-picker  
      v-model="value2"  
      type="date"  
      placeholder="选择日期"  
      format="yyyy 年 MM 月 dd 日"  
      value-format="yyyy-MM-dd">  
</el-date-picker>