datetimepicker: fix clear panel date and time show when clear (#1494)

pull/1503/merge
Liu Yuyang 2016-12-01 22:28:23 +08:00 committed by cinwell.li
parent 707a0d5a60
commit a0bb371de0
1 changed files with 4 additions and 4 deletions

View File

@ -176,19 +176,19 @@
}, },
minVisibleDate() { minVisibleDate() {
return formatDate(this.minDate); return this.minDate ? formatDate(this.minDate) : '';
}, },
maxVisibleDate() { maxVisibleDate() {
return formatDate(this.maxDate || this.minDate); return (this.maxDate || this.minDate) ? formatDate(this.maxDate || this.minDate) : '';
}, },
minVisibleTime() { minVisibleTime() {
return formatDate(this.minDate, 'HH:mm:ss'); return this.minDate ? formatDate(this.minDate, 'HH:mm:ss') : '';
}, },
maxVisibleTime() { maxVisibleTime() {
return formatDate(this.maxDate, 'HH:mm:ss'); return (this.maxDate || this.minDate) ? formatDate(this.maxDate || this.minDate, 'HH:mm:ss') : '';
}, },
rightDate() { rightDate() {