Prevent selecting disabled dates

This commit is contained in:
Sergio Crisostomo 2018-05-21 08:24:56 +02:00
parent e9d7ff50f5
commit 939a162ad7
4 changed files with 13 additions and 4 deletions

View file

@ -7,7 +7,7 @@
</div>
<span
:class="getCellCls(cell)"
v-for="(cell, i) in readCells"
v-for="(cell, i) in cells"
:key="String(cell.date) + i"
@click="handleClick(cell, $event)"
@mouseenter="handleMouseMove(cell)"
@ -61,7 +61,7 @@
const weekDays = translatedDays.splice(weekStartDay, 7 - weekStartDay).concat(translatedDays.splice(0, weekStartDay));
return this.showWeekNumbers ? [''].concat(weekDays) : weekDays;
},
readCells () {
cells () {
const tableYear = this.tableDate.getFullYear();
const tableMonth = this.tableDate.getMonth();
const today = clearHours(new Date()); // timestamp of today

View file

@ -2,6 +2,7 @@
import {clearHours} from '../util';
export default {
name: 'PanelTable',
props: {
tableDate: {
type: Date,