aboutsummaryrefslogtreecommitdiff
path: root/resources/vue/components/Timepicker.vue
blob: 0bef84e4157c73d1bc8140c5b70b7fc2380d0612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<template>
    <input type="time"
           ref="visibleInput"
           class="hasTimepicker"
           v-model="timeValue"
           :placeholder="placeholder"
           :min="mintime"
           :max="maxtime"
           :name="name">
</template>

<script>
export default {
    name: 'Timepicker',
    emits: ['update:modelValue'],
    inheritAttrs: false,
    props: {
        name: {
            type: String,
            required: false
        },
        modelValue: String,
        mintime: String,
        maxtime: String,
        placeholder: String,
    },
    computed: {
        timeValue: {
            get() {
                return this.modelValue;
            },
            set(value) {
                this.$emit('update:modelValue', value);
            }
        }
    }
}
</script>
<style scoped>
input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
}
</style>