Skip to content

Selecting a single week within week-range picker leads to multiple weeks being displayed in collapsed view #972

Closed
@nuernbergk

Description

@nuernbergk

Describe the bug
With a week-range picker, selecting just a single week and then hitting select leads to the collapsed DatePicker to display the current week as the end date of that range.

To Reproduce
Steps to reproduce the behavior:

  1. Create a VueDatePicker element:
<VueDatePicker
    range
    week-picker
    v-model="dateRange"
    :week-start-day="1"
    :week-numbers="{ type: 'iso' }"
    :enable-time-picker="false"
    format="ww-yyyy"
/>
  1. Select a single week:
Screenshot 01
  1. Click select.
  2. In the collapsed DatePicker, the a range of the selected week and the current week is displayed as selected
Screenshot 02

Although the v-model does not seem to be updated to reflect this.
7. When reopening the date viewer, the range seen in the preview is displayed as selected.

Note that this also happens when using the notoday property.

Expected behavior
I would expect the behaviour to be that of other partial ranges, i.e. when a single part of the range is selected, the collapsed view only shows that part of the range.

Desktop & mobile:

  • Browser: Firefox, Chrome, Safari
  • Library version: 9.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions