feat(date-picker): readonly and disable handle

This commit is contained in:
Methapon Metanipat 2024-10-21 15:05:00 +07:00
parent 55a443521f
commit 65bb13837e

View file

@ -9,6 +9,7 @@ const model = defineModel<string | Date | null>();
const props = defineProps<{ const props = defineProps<{
id?: string; id?: string;
readonly?: boolean; readonly?: boolean;
disabled?: boolean;
clearable?: boolean; clearable?: boolean;
label?: string; label?: string;
bgColor?: string; bgColor?: string;
@ -59,7 +60,7 @@ function valueUpdate(value: string) {
auto-apply auto-apply
:id :id
:for="id" :for="id"
:disabled="readonly" :disabled="readonly || disabled"
:disabled-dates="disabledDates" :disabled-dates="disabledDates"
:teleport="true" :teleport="true"
:dark="$q.dark.isActive" :dark="$q.dark.isActive"
@ -78,7 +79,8 @@ function valueUpdate(value: string) {
:rules :rules
:label :label
:for="id" :for="id"
:readonly="readonly" :readonly="readonly || disabled"
:disable="disabled"
:mask="readonly ? '' : '##/##/####'" :mask="readonly ? '' : '##/##/####'"
:model-value=" :model-value="
model model