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