Merge pull request #2177 from QingWei-Li/fix/date-select

TimeSelect: fix maxTime range, fixed #2158
This commit is contained in:
baiyaaaaa 2017-01-04 08:36:11 +08:00 committed by GitHub
commit 661dc09002
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@
result.push({
value: current,
disabled: compareTime(current, this.minTime || '-1:-1') <= 0 ||
compareTime(current, this.maxTime || '100:100') > 0
compareTime(current, this.maxTime || '100:100') >= 0
});
current = nextTime(current, step);
}

View File

@ -160,7 +160,7 @@ describe('TimeSelect', () => {
setTimeout(_ => {
const elm = picker.picker.$el.querySelector('.disabled');
expect(elm.textContent).to.equal('15:00');
expect(elm.textContent).to.equal('14:30');
destroyVM(vm);
done();
}, 50);