diff --git a/src/components/VnTable/VnFilter.vue b/src/components/VnTable/VnFilter.vue index 3d489cf73..9ce050fe9 100644 --- a/src/components/VnTable/VnFilter.vue +++ b/src/components/VnTable/VnFilter.vue @@ -7,6 +7,7 @@ import { useArrayData } from 'composables/useArrayData'; import VnSelect from 'components/common/VnSelect.vue'; import VnInput from 'components/common/VnInput.vue'; import VnInputDate from 'components/common/VnInputDate.vue'; +import VnInputTime from 'components/common/VnInputTime.vue'; import VnTableColumn from 'components/VnTable/VnColumn.vue'; const $props = defineProps({ @@ -75,6 +76,17 @@ const components = { }, forceAttrs, }, + time: { + component: markRaw(VnInputTime), + event: updateEvent, + attrs: { + ...defaultAttrs, + disable: !$props.isEditable, + }, + forceAttrs: { + label: $props.showLabel && $props.column.label, + }, + }, checkbox: { component: markRaw(QCheckbox), event: updateEvent, diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 60fd67c0f..26df2e3ba 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -5,10 +5,6 @@ import { useI18n } from 'vue-i18n'; const model = defineModel({ type: String }); const $props = defineProps({ - readonly: { - type: Boolean, - default: false, - }, isOutlined: { type: Boolean, default: false, @@ -48,6 +44,7 @@ const formattedDate = computed({ return date.formatDate(new Date(model.value), dateFormat); }, set(value) { + if (value == model.value) return; let newDate; if (value) { // parse input @@ -97,12 +94,18 @@ watch( v-bind="{ ...$attrs, ...styleAttrs }" :class="{ required: $attrs.required }" :rules="$attrs.required ? [requiredFieldRule] : null" + :clearable="false" >