https://jiayingy.github.io/vue-single-date-picker/
npm i vue-single-date-picker
Import package
import SingleDatePicker from 'vue-single-date-picker';
export default {
components: {
SingleDatePicker
}
}
Create component in your template
<SingleDatePicker />
-
This library uses Google Material Icon pack. Refer to here on how to include it in your project.
-
In your css/scss file,
@import '~vue-single-date-picker/dist/vue-single-date-picker.css';
Props | arguments | remarks |
---|---|---|
date | { year: <Number>, month: <Number>, date: <Number> } |
E.g. 1 Jan 2020 {year: 2020, month: 0, date: 1} |
first-day-of-week | firstDayOfWeek: <Number> |
(0: Sunday ... 6: Saturday) E.g. start week on Monday :first-day-of-week="1" |
events | arguments | remarks |
---|---|---|
@selectDate | { year: <Number>, month: <Number>, date: <Number> } |
E.g. 1 Jan 2020 {year: 2020, month: 0, date: 1} |