Skip to content

maxRange not working with year-picker enabled #1123

@Dev-Hogan

Description

@Dev-Hogan

Describe the bug
When using year-picker together with maxRange the selection does not respect the set maxRange.

To Reproduce
https://stackblitz.com/edit/vuepic-vue-datepicker-ksyengch?file=src%2Fcomponents%2FPlayground.vue
Code:

<template>
  <div>
    <Datepicker v-model="date" :range="{ maxRange: 730 }" year-picker />
    {{ date }}
  </div>
</template>

<script setup>
import { ref } from 'vue';
import Datepicker from '@vuepic/vue-datepicker';
import '@vuepic/vue-datepicker/dist/main.css';

const date = ref();
</script>`

Expected behavior
The maxRange is not available.

Image

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