// This doesn't work
<input type='date' v-model='store.myDateObject'>
如何将日期输入绑定到商店中的日期对象?
答案 0 :(得分:2)
假设您希望您的日期为午夜UTC日期对象,请执行此操作...
<input type='date'
:value='store.myDate.toJSON().substring(0,10)'
@input='store.myDate = new Date($event.target.value)'
>