refs #6907 feat: add mask and today button
This commit is contained in:
parent
926f3b6950
commit
9e9ad577f4
|
@ -52,10 +52,6 @@ const styleAttrs = computed(() => {
|
|||
}
|
||||
: {};
|
||||
});
|
||||
function maxDate(date) {
|
||||
const today = formatDate(new Date());
|
||||
return date <= today;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -76,6 +72,23 @@ function maxDate(date) {
|
|||
></QIcon>
|
||||
<QIcon name="event" class="cursor-pointer">
|
||||
<QPopupProxy
|
||||
v-model="isPopupOpen"
|
||||
cover
|
||||
transition-show="scale"
|
||||
transition-hide="scale"
|
||||
:no-parent-event="props.readonly"
|
||||
>
|
||||
<QDate
|
||||
:today-btn="true"
|
||||
mask="YYYY-MM-DD"
|
||||
:model-value="value"
|
||||
@update:model-value="onDateUpdate"
|
||||
/>
|
||||
</QPopupProxy>
|
||||
</QIcon>
|
||||
</template>
|
||||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
Loading…
Reference in New Issue