v-calendar
Version:
A clean and extendable plugin for building simple attributed calendars in Vue.js.
29 lines (27 loc) • 596 B
JavaScript
import { defaultsMixin } from '../defaults';
export const childMixin = {
inject: ['sharedState'],
mixins: [defaultsMixin],
computed: {
masks() {
return this.sharedState.masks;
},
theme() {
return this.sharedState.theme;
},
locale() {
return this.sharedState.locale;
},
dayPopoverId() {
return this.sharedState.dayPopoverId;
},
},
methods: {
format(date, mask) {
return this.locale.format(date, mask);
},
pageForDate(date) {
return this.locale.getDateParts(this.locale.normalizeDate(date));
},
},
};