Open cregx opened 1 year ago
I have made a few more attempts to rule out errors in interpreting the documentation.
If I use date objects instead of string-based dates, the result is slightly different, but again, neither reproducible nor traceable.
My Pinia-based store
import { defineStore } from 'pinia'
export const useAppStore = defineStore('app', {
state: () => {
return {
generalHolidays: [],
};
},
actions: {
updateGeneralHolidays() { // <= This action is to dynamically generate an array of repeating ISO-based calendar data.
const year = new Date().getFullYear();
const daysOff = [
new Date(year, 5, 13),
new Date(year, 5, 16),
new Date(year, 5, 22),
new Date(year, 5, 24),
new Date(year, 5, 25),
];
this.generalHolidays = daysOff;
},
},
And this is the result:
I don't want to get hung up on the idea and would appreciate more ideas on how to solve my problem: In principle, I don't want to have to enter calendar data for holidays over and over again, e.g. 1x a year, but do it automatically with the solution I presented. I think that other users of V-Calendar might also have this problem.
So I would be thankful for alternative solutions.
Hello,
I want to initialize a calendar so that certain days of the week, e.g. Sunday, are always deactivated. This works understandably well - also thanks to the documentation. However, when I want to add more days (holidays), I get an incomprehensible result. I must admit that I am neither a JavaScript nor a Vue expert.
The source code I used looks like this in excerpts:
My Vue component
My Pinia-based store
If I now try to initialize the calendar accordingly via initDisabledDates and disable only certain dates, then only two calendar days are disabled or not at all.
My Vue component (Composition API)
And this is the result:
What happens to the 2023-06-03?
Can anyone explain my error or point me to a solution. I would be very grateful for it.
@nathanreyes: Basically I find V-Calendar very good. Thank you for that.