vue-datepicker icon indicating copy to clipboard operation
vue-datepicker copied to clipboard

Limited day is clickable

Open antonkomarev opened this issue 8 years ago • 5 comments

selection_227

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.

antonkomarev avatar Feb 03 '17 00:02 antonkomarev

+1

IMO red should just take you to the next month, not actually be selectable.

n8-dev avatar Apr 11 '17 22:04 n8-dev

@n8-sd Yes, but if the are unavailable to be selected - they should be unclickable.

antonkomarev avatar Apr 12 '17 15:04 antonkomarev

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) {

vwakeup avatar Jul 19 '17 13:07 vwakeup

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) }

hu3402379 avatar Jul 20 '17 10:07 hu3402379

thank you! :)

JStrebeyko avatar Mar 27 '18 11:03 JStrebeyko