fix: 修复bug #6404
This commit is contained in:
parent
50ebddc7c9
commit
5c7cde1b8c
2 changed files with 13 additions and 4 deletions
|
@ -260,6 +260,8 @@
|
|||
<DatePicker type="daterange" transfer show-week-numbers placeholder="Select date" style="width: 400px"></DatePicker>
|
||||
<DatePicker type="datetimerange" transfer show-week-numbers placeholder="Select date" style="width: 400px"></DatePicker>
|
||||
<Time-Picker :steps="[1, 1, 15]" :value="new Date()"></Time-Picker>
|
||||
|
||||
<DatePicker type="daterange" split-panels placeholder="Select date" style="width: 200px"></DatePicker>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -296,11 +296,18 @@
|
|||
},
|
||||
changePanelDate(panel, type, increment, updateOtherPanel = true){
|
||||
const current = new Date(this[`${panel}PanelDate`]);
|
||||
|
||||
if (this.splitPanels) {
|
||||
// fix #6404
|
||||
current[`set${type}`](current[`get${type}`]() + increment);
|
||||
} else {
|
||||
if (panel === 'left') {
|
||||
current[`set${type}`](current[`get${type}`](), 0);
|
||||
current[`set${type}`](current[`get${type}`]() + increment);
|
||||
} else {
|
||||
current[`set${type}`](current[`get${type}`]() + increment);
|
||||
}
|
||||
}
|
||||
|
||||
this[`${panel}PanelDate`] = current;
|
||||
|
||||
if (!updateOtherPanel) return;
|
||||
|
|
Loading…
Reference in a new issue