Skip to content

Allowed dates can't be selected in month picker #1075

Closed
@DmitryTar1

Description

@DmitryTar1

Describe the bug
Allowed dates in month picker updated visually, but not allowed to select.
For example I have allowedDates = ['2020-01'], I see in datepicker that I can select this month, but it's not working.
It worked in version 10.0.0.

To Reproduce
Steps to reproduce the behavior:
Code example attached, updated a little demo version.
In this case callback won't be called.

<template>
  <div>
    <Datepicker
      month-picker
      auto-apply
      text-input
      :allowed-dates="['2020-01']"
      @update:modelValue="callback"
    />
  </div>
</template>

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

const date = ref();
const callback = (value) => {
  console.log(value, 'value');
};
</script>

Expected behavior
User can select the month that is allowed and the callback will work.

Image

Desktop & mobile (please complete the following information):

  • Browser chrome
  • Library version 11.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