refactor: handleDate
This commit is contained in:
parent
bb8d007b2d
commit
71ccf65f9d
4 changed files with 26 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { isRoleInclude } from 'src/stores/utils';
|
||||
import DatePicker from '../shared/DatePicker.vue';
|
||||
import { disabledAfterToday } from 'src/utils/datetime';
|
||||
|
||||
const code = defineModel<string>('code');
|
||||
const branchCount = defineModel<number>('branchCount', { default: 0 });
|
||||
|
|
@ -221,6 +222,12 @@ function formatCode(input: string | undefined, type: 'code' | 'number') {
|
|||
:readonly="readonly"
|
||||
:label="$t('general.expirationDate')"
|
||||
v-model="permitExpireDate"
|
||||
:disabled-dates="
|
||||
(date: Date) =>
|
||||
date.getTime() <
|
||||
((permitIssueDate && new Date(permitIssueDate).getTime()) ||
|
||||
Date.now())
|
||||
"
|
||||
clearable
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue