0
0
Fork 0

Merge branch 'dev' into 7553_FixTicketExpedition

This commit is contained in:
Javier Segarra 2024-09-25 05:50:22 +00:00
commit c1087614c6
3 changed files with 7 additions and 0 deletions

View File

@ -103,6 +103,7 @@ const mixinRules = [
@click=" @click="
() => { () => {
value = null; value = null;
vnInputRef.focus();
emit('remove'); emit('remove');
} }
" "

View File

@ -20,6 +20,7 @@ const { validations } = useValidator();
const { t } = useI18n(); const { t } = useI18n();
const requiredFieldRule = (val) => validations().required($attrs.required, val); const requiredFieldRule = (val) => validations().required($attrs.required, val);
const vnInputDateRef = ref(null);
const dateFormat = 'DD/MM/YYYY'; const dateFormat = 'DD/MM/YYYY';
const isPopupOpen = ref(); const isPopupOpen = ref();
@ -91,6 +92,7 @@ const styleAttrs = computed(() => {
<template> <template>
<div @mouseover="hover = true" @mouseleave="hover = false"> <div @mouseover="hover = true" @mouseleave="hover = false">
<QInput <QInput
ref="vnInputDateRef"
v-model="formattedDate" v-model="formattedDate"
class="vn-input-date" class="vn-input-date"
:mask="mask" :mask="mask"
@ -113,6 +115,7 @@ const styleAttrs = computed(() => {
!$attrs.disable !$attrs.disable
" "
@click=" @click="
vnInputDateRef.focus();
model = null; model = null;
isPopupOpen = false; isPopupOpen = false;
" "

View File

@ -16,6 +16,7 @@ const props = defineProps({
default: false, default: false,
}, },
}); });
const vnInputTimeRef = ref(null);
const initialDate = ref(model.value ?? Date.vnNew()); const initialDate = ref(model.value ?? Date.vnNew());
const { t } = useI18n(); const { t } = useI18n();
const requiredFieldRule = (val) => validations().required($attrs.required, val); const requiredFieldRule = (val) => validations().required($attrs.required, val);
@ -69,6 +70,7 @@ function dateToTime(newDate) {
<template> <template>
<div @mouseover="hover = true" @mouseleave="hover = false"> <div @mouseover="hover = true" @mouseleave="hover = false">
<QInput <QInput
ref="vnInputTimeRef"
class="vn-input-time" class="vn-input-time"
mask="##:##" mask="##:##"
placeholder="--:--" placeholder="--:--"
@ -92,6 +94,7 @@ function dateToTime(newDate) {
!$attrs.disable !$attrs.disable
" "
@click=" @click="
vnInputTimeRef.focus();
model = null; model = null;
isPopupOpen = false; isPopupOpen = false;
" "