TimeSelect: fix maxTime range, fixed #2158

This commit is contained in:
qingwei.li 2017-01-03 18:52:44 +08:00
parent 4da8b2a2dd
commit 9ee7afc1c5
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);