Do not reinvent the wheel to create your own date picker component. Just use one of the existing components and praise those developers who share great things.
I have historically struggled with date pickers and had finally settled in on a good date picker for Vuetify. Since most of my Vue projects are standardized on Materialize, that posed no issues.
However, if I need to create something outside of Vuetify, the available options suddenly explode to my utter delight. I have not really dug deep - but the aptly named ‘vuejs-datepicker’ checks all the boxes.
Code below -
|
|
See the above code in action -