forked from CGM_Public/pretix_original
Fix timepicker in checkinrules (#6182)
The timepickers format was changed by accident to the datetimeformat in the vue3 migration
This commit is contained in:
@@ -191,3 +191,8 @@ export const DATETIME_OPTIONS = {
|
|||||||
close: 'fa fa-remove'
|
close: 'fa fa-remove'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const TIME_OPTIONS = {
|
||||||
|
...DATETIME_OPTIONS,
|
||||||
|
format: document.body.dataset.timeformat,
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted, onUnmounted } from 'vue'
|
import { ref, watch, onMounted, onUnmounted } from 'vue'
|
||||||
import { DATETIME_OPTIONS } from './constants'
|
import { TIME_OPTIONS } from './constants'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
required?: boolean
|
required?: boolean
|
||||||
@@ -20,7 +20,7 @@ watch(() => props.value, (val) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
$(input.value)
|
$(input.value)
|
||||||
.datetimepicker({
|
.datetimepicker({
|
||||||
...DATETIME_OPTIONS,
|
...TIME_OPTIONS,
|
||||||
showClear: props.required,
|
showClear: props.required,
|
||||||
})
|
})
|
||||||
.trigger('change')
|
.trigger('change')
|
||||||
|
|||||||
Reference in New Issue
Block a user