Vuepic / vue-datepicker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
1.4k stars 137 forks source link

Type of "year" slot is incorrect #867

Closed Tsuyoshi84 closed 2 months ago

Tsuyoshi84 commented 2 months ago

Describe the bug The type definition of year slot seems to be incorrect.

The document says that value will be passed from the year slot.

image

I also confirmed that I can use value to show the year. However, according to the type definition, I'm supposed to use year instead of value.

https://github.com/Vuepic/vue-datepicker/blob/7eceb7271fcb5ade9a68d6821c97e313159043cb/index.d.ts#L404

Because of that, if I follow the document instruction, I get a type error.

To Reproduce N/A

Expected behavior

I assume the type definition needs to be like this:

    year(props: { text: string; value: number }): any;

Screenshots

image

Desktop & mobile (please complete the following information): N/A