Open antonkomarev opened 7 years ago
+1
IMO red should just take you to the next month, not actually be selectable.
@n8-sd Yes, but if the are unavailable to be selected - they should be unclickable.
find code var passiveDaysAtFinal = 42 - days.length; for (var _i2 = 1; _i2 <= passiveDaysAtFinal; _i2++) { var _passiveDay = { value: _i2, inMonth: false, action: 'next', unavailable: false, checked: false, moment: (0, _moment2.default)(currentMoment).add(1, 'months').date(_i2) };
then move up before
if (this.limit.length > 0) {
find code and change unavailable from false to true.
for (let i = 0; i < firstDay - (this.option.SundayFirst ? 0 : 1); i++) { let passiveDay = { value: previousMonth.daysInMonth() - (i), inMonth: false, action: 'previous', unavailable: true, checked: false, moment: moment(currentMoment).date(1).subtract(i + 1, 'days') } days.unshift(passiveDay) }
let passiveDaysAtFinal = 42 - days.length for (let i = 1; i <= passiveDaysAtFinal; i++) { let passiveDay = { value: i, inMonth: false, action: 'next', unavailable: true, checked: false, moment: moment(currentMoment).add(1, 'months').date(i) } days.push(passiveDay) }
thank you! :)
Dates are limited from 4th of february till 23rd. Dates highlighted with green marker are unclickable. Dates marked with red - are broken: could be selected!
Using in Vue.js v1
Note: Days from previous month are all unclickable.