refs #6907 feat: add mask and today button

This commit is contained in:
Javier Segarra 2024-02-26 07:23:04 +01:00
parent 926f3b6950
commit 9e9ad577f4
1 changed files with 17 additions and 4 deletions

View File

@ -52,10 +52,6 @@ const styleAttrs = computed(() => {
} }
: {}; : {};
}); });
function maxDate(date) {
const today = formatDate(new Date());
return date <= today;
}
</script> </script>
<template> <template>
@ -76,6 +72,23 @@ function maxDate(date) {
></QIcon> ></QIcon>
<QIcon name="event" class="cursor-pointer"> <QIcon name="event" class="cursor-pointer">
<QPopupProxy <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> </template>
<style lang="scss"> <style lang="scss">