Element Plus version
1.1.0-beta.8
OS/Browsers version
chrome
Vue version
3.2.8
Reproduction Link
https://codesandbox.io/s/element-plus-spa-forked-6wtbz?file=/src/App.vue
Steps to reproduce
Hi,
When use date picker with a default value to today, default-value can not compute value from new Date(Date.now())
What is Expected?
I should expect to see today date prefilled
What is actually happening?
the date picker input is blank
2条答案
按热度按时间mzsu5hc01#
:default-value="defaultValue"
is optional default date of the calendar,The default value displayed is the value ofv-model
kkbh8khc2#
@ntgraph , as @imswk says, you could set
value
toconst value = ref(new Date(Date.now()));
: https://codesandbox.io/s/element-plus-spa-forked-b2imb?file=/src/App.vue