el-date-picker的默认值格式
时间: 2023-08-21 15:04:08 浏览: 120
el-date-picker的默认值格式可以通过value-format属性进行设置。在html代码中,你可以将value-format属性设置为你想要的日期格式,比如"yyyy-MM-dd HH:mm:ss"。然后在v-model中绑定默认值,可以在mounted方法中设置默认值。比如,你可以使用this.form.applyBeginTime = new Date()来设置默认值。另外,你也可以使用parseTime方法对默认值进行格式化处理,例如this.form.applyBeginTime = parseTime(this.form.applyBeginTime)。 [1 [2<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [el-date-picker不会格式化默认值?](https://blog.csdn.net/Black_And_Cat/article/details/123641303)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [SpringBoot+Vue实现excel导入带格式化的时间参数(moment格式化明天日期并设置el-date-picker默认值)](https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/127821880)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文