Merge branch 'oat_dev' into develop
This commit is contained in:
commit
1ccfba485c
2 changed files with 16 additions and 1 deletions
|
|
@ -119,6 +119,12 @@ function closeDialog() {
|
|||
clearFormData();
|
||||
}
|
||||
|
||||
const calculateMaxDate = () => {
|
||||
const today = new Date();
|
||||
today.setFullYear(today.getFullYear() - 18);
|
||||
return today;
|
||||
};
|
||||
|
||||
function clearFormData() {
|
||||
formData.prefix = "";
|
||||
formData.firstName = "";
|
||||
|
|
@ -195,7 +201,6 @@ watch(
|
|||
hide-bottom-space
|
||||
:rules="[
|
||||
(val) => {
|
||||
console.log(val);
|
||||
return val.length > 0 || 'กรุณาเลือกคำนำหน้าชื่อ';
|
||||
},
|
||||
]"
|
||||
|
|
@ -265,6 +270,8 @@ watch(
|
|||
autoApply
|
||||
borderless
|
||||
week-start="0"
|
||||
:max-date="calculateMaxDate()"
|
||||
:enableTimePicker="false"
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.birthDate"
|
||||
:locale="'th'"
|
||||
|
|
|
|||
|
|
@ -267,6 +267,12 @@ async function getData() {
|
|||
});
|
||||
}
|
||||
|
||||
const calculateMaxDate = () => {
|
||||
const today = new Date();
|
||||
today.setFullYear(today.getFullYear() - 18);
|
||||
return today;
|
||||
};
|
||||
|
||||
async function editData() {
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -550,7 +556,9 @@ onMounted(async () => {
|
|||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<datepicker
|
||||
autoApply
|
||||
:max-date="calculateMaxDate()"
|
||||
borderless
|
||||
:enableTimePicker="false"
|
||||
week-start="0"
|
||||
menu-class-name="modalfix"
|
||||
v-model="formData.birthDate"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue