auto-close datepicker (#512)
* auto-close datepicker * auto close date modification * remove unused attributes --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
edf4d4bfe4
commit
6fc4fbafa3
|
|
@ -71,7 +71,7 @@
|
|||
:max-date="maxDate"
|
||||
:is-dark="props.isDark"
|
||||
color="form-color"
|
||||
@close="close"
|
||||
@update:modelValue="updateModelValue"
|
||||
/>
|
||||
<DatePicker
|
||||
v-else
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
:max-date="maxDate"
|
||||
:is-dark="props.isDark"
|
||||
color="form-color"
|
||||
@close="close"
|
||||
@update:modelValue="updateModelValue"
|
||||
/>
|
||||
</template>
|
||||
</UPopover>
|
||||
|
|
@ -143,6 +143,12 @@ const modeledValue = computed({
|
|||
}
|
||||
})
|
||||
|
||||
const updateModelValue = () => {
|
||||
if (!props.withTime && !props.dateRange) {
|
||||
pickerOpen.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const inputClasses = computed(() => {
|
||||
const classes = [props.theme.DateInput.input, props.theme.DateInput.borderRadius]
|
||||
if (props.disabled) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue