Skip to content

In year-picker disabled-dates property does not accept a custom callback function #1105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gabsi20 opened this issue Mar 18, 2025 · 0 comments · Fixed by #1107
Closed

In year-picker disabled-dates property does not accept a custom callback function #1105

gabsi20 opened this issue Mar 18, 2025 · 0 comments · Fixed by #1107
Labels
bug Something isn't working

Comments

@gabsi20
Copy link

gabsi20 commented Mar 18, 2025

Describe the bug
The is no function handling in isYearDisabled in year-picker.ts.

To Reproduce

<script>
import DatePicker from "@vuepic/vue-datepicker";
import '@vuepic/vue-datepicker/dist/main.css'

export default {
  name: "DatePickerExamnle",
  components: {DatePicker},
  data() {
    return { years: [new Date("2023").getFullYear()] }
  },
  methods: {
    isDateDisabled(date) {
      console.log("this is never called");
      return false;
    },
  },
};
</script>

<template>
  <date-picker 
    v-model="years" 
    :year-range="[2010, new Date().getFullYear()]"
    :disabled-dates="isDateDisabled" 
    year-picker multi-dates />

</template>

Expected behavior
Should evaluate callback function for disabled dates.

@gabsi20 gabsi20 added awaiting triage The issue is not reviewed by the maintainers bug Something isn't working labels Mar 18, 2025
@Jasenkoo Jasenkoo removed the awaiting triage The issue is not reviewed by the maintainers label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants