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",
|
default: "false",
|
||||||
description: "Whether to hide the overlay on date selection when showTime is enabled."
|
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",
|
name: "timeSeparator",
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|
|
@ -215,6 +215,10 @@ export interface CalendarProps {
|
||||||
* Whether to hide the overlay on date selection when showTime is enabled.
|
* Whether to hide the overlay on date selection when showTime is enabled.
|
||||||
*/
|
*/
|
||||||
hideOnDateTimeSelect?: boolean | undefined;
|
hideOnDateTimeSelect?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* Whether to hide the overlay on date selection is completed when selectionMode is range.
|
||||||
|
*/
|
||||||
|
hideOnRangeSelection?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Separator of time selector.
|
* Separator of time selector.
|
||||||
* Default value is ':'.
|
* Default value is ':'.
|
||||||
|
|
|
@ -283,6 +283,10 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
hideOnRangeSelection: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
timeSeparator: {
|
timeSeparator: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ':'
|
default: ':'
|
||||||
|
@ -939,6 +943,12 @@ export default {
|
||||||
if (modelVal !== null) {
|
if (modelVal !== null) {
|
||||||
this.updateModel(modelVal);
|
this.updateModel(modelVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.isRangeSelection() && this.hideOnRangeSelection && modelVal[1] !== null) {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.overlayVisible = false;
|
||||||
|
}, 150);
|
||||||
|
}
|
||||||
this.$emit('date-select', date);
|
this.$emit('date-select', date);
|
||||||
},
|
},
|
||||||
updateModel(value) {
|
updateModel(value) {
|
||||||
|
|
|
@ -398,6 +398,12 @@ export default {
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>Whether to hide the overlay on date selection when showTime is enabled.</td>
|
<td>Whether to hide the overlay on date selection when showTime is enabled.</td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td>timeSeparator</td>
|
<td>timeSeparator</td>
|
||||||
<td>string</td>
|
<td>string</td>
|
||||||
|
|
Loading…
Reference in New Issue