Skip to content

PickerListYears

A component displaying a list of years for the calendar.

Props

datepreview
required
Current auxiliary date
type:Dayjs

Events

set-year
Set a year

Example

Lista lat
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
Change the year to 2018
html
<picker-list-years :datepreview="state.previewDay" />
ts
import { reactive } from 'vue'
import dayjs from 'dayjs'
const state = reactive({
  previewDay: dayjs('2023-03-09')
})

function set() {
  state.previewDay = dayjs('2018-03-09')
}