Merge pull request #2740 from tugcekucukoglu/calendar
Fixed #2684 - Add hideOnRangeSelection property to Calendarpull/2753/head
commit
d5dd8d30a0
|
@ -198,6 +198,12 @@ const CalendarProps = [
|
|||
default: "false",
|
||||
description: "Whether to hide the overlay on date selection when showTime is enabled."
|
||||
},
|
||||
{
|
||||
name: "hideOnRangeSelection",
|
||||
type: "boolean",
|
||||
default: "false",
|
||||
description: "Whether to hide the overlay on date selection is completed when selectionMode is range."
|
||||
},
|
||||
{
|
||||
name: "timeSeparator",
|
||||
type: "string",
|
||||
|
|
|
@ -215,6 +215,10 @@ export interface CalendarProps {
|
|||
* Whether to hide the overlay on date selection when showTime is enabled.
|
||||
*/
|
||||
hideOnDateTimeSelect?: boolean | undefined;
|
||||
/**
|
||||
* Whether to hide the overlay on date selection is completed when selectionMode is range.
|
||||
*/
|
||||
hideOnRangeSelection?: boolean | undefined;
|
||||
/**
|
||||
* Separator of time selector.
|
||||
* Default value is ':'.
|
||||
|
|
|
@ -283,6 +283,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hideOnRangeSelection: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
timeSeparator: {
|
||||
type: String,
|
||||
default: ':'
|
||||
|
@ -939,6 +943,12 @@ export default {
|
|||
if (modelVal !== null) {
|
||||
this.updateModel(modelVal);
|
||||
}
|
||||
|
||||
if (this.isRangeSelection() && this.hideOnRangeSelection && modelVal[1] !== null) {
|
||||
setTimeout(() => {
|
||||
this.overlayVisible = false;
|
||||
}, 150);
|
||||
}
|
||||
this.$emit('date-select', date);
|
||||
},
|
||||
updateModel(value) {
|
||||
|
|
|
@ -398,6 +398,12 @@ export default {
|
|||
<td>false</td>
|
||||
<td>Whether to hide the overlay on date selection when showTime is enabled.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>hideOnRangeSelection</td>
|
||||
<td>boolean</td>
|
||||
<td>false</td>
|
||||
<td>Whether to hide the overlay on date selection is completed when selectionMode is range.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>timeSeparator</td>
|
||||
<td>string</td>
|
||||
|
|
Loading…
Reference in New Issue