mengxiong10 / vue2-datepicker

A datepicker / datetimepicker component for Vue2
https://mengxiong10.github.io/vue2-datepicker/index.html
MIT License
1.52k stars 407 forks source link

[Feature request] Ability to specify a default time #743

Closed donalmurtagh closed 1 year ago

donalmurtagh commented 1 year ago

What problem does this feature solve? When using the picker to choose a time or datetime, the current default is always midnight. It would be useful if this could be overridden via a prop

What does the proposed API look like? A prop that allows the default time to be overridden, e.g. default-time="09:00:00"

mengxiong10 commented 1 year ago

props default-value

<date-picker :default-value="new Date(new Date().setHours(9, 0, 0, 0))" />