Skip to content

Missing value and text props in year slot when using the month picker #1154

@mayswind

Description

@mayswind

Describe the bug
Missing value and text props in year slot when using the month picker

To Reproduce
Steps to reproduce the behavior:

Use these code, and there would display double undefined in the header (see the below screenshot)

<vue-date-picker inline month-picker>
    <template #year="{ value, text }">
        {{ `${typeof value} ${typeof text}` }}
    </template>
</vue-date-picker>
Image

Expected behavior
In the slot definition, the value and text props should be in the year slot

Image

In addition, I have checked the code in the DpHeader.vue, the display text should be format, and the text of year displayed in month picker does not be formatted.

Screenshots
The screenshots are provided above

Desktop & mobile (please complete the following information):

  • Browser Edge
  • Library version 11.0.2 and the latest code in the main branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageThe issue is not reviewed by the maintainersbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions