mirror of
https://github.com/directus/directus.git
synced 2026-02-01 15:34:57 -05:00
add clear button to datetime interface (#4064)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
:placeholder="$t('enter_a_value')"
|
||||
>
|
||||
<template #append>
|
||||
<v-icon name="today" :class="{ active }" />
|
||||
<v-icon :name="value ? 'close' : 'today'" :class="{ active }" @click.stop="unsetValue" />
|
||||
</template>
|
||||
</v-input>
|
||||
</template>
|
||||
@@ -104,8 +104,13 @@ export default defineComponent({
|
||||
hourItems,
|
||||
minutesSecondItems,
|
||||
displayValue,
|
||||
unsetValue,
|
||||
};
|
||||
|
||||
function unsetValue() {
|
||||
emit('input', null);
|
||||
}
|
||||
|
||||
function useLocalValue() {
|
||||
const _value = computed({
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user