hilongjw / vue-datepicker

[Deprecated] calendar and datepicker component with material design for Vue.js
http://hilongjw.github.io/vue-datepicker/demo.html
MIT License
702 stars 207 forks source link

there is a bug about fromto of limit #113

Open mecoo288 opened 7 years ago

mecoo288 commented 7 years ago

When you set the date from 2017-6-1 to 2017-6-30, you will find that the bottom of the calendar, 1 through 9, will still be available in July, but not highlighted

BlayFlorian commented 7 years ago

:+1:

wangxjsteven commented 7 years ago

I also had this problem

vwakeup commented 7 years ago
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) {**
hu3402379 commented 7 years ago

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

artiely commented 7 years ago

I also had this problem

M-torch99 commented 7 years ago

I also had this problem?has anyone solved it?

vaibhav281128 commented 6 years ago

date format in 'to' field takes date in 'mm-dd-yyyy' format