weekly_select.vue 467 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
<template>
    <a-week-picker
        class="tw-w-full"
        placeholder="Select week"
        @change="change"
        v-bind="$attrs"
        v-on="$listeners"
    />
</template>

<script>
export default {
    props: {
        year: String,
        week: String,
    },
    methods: {
        change(val) {
            this.$emit('update:week', val.week().toString());
            this.$emit('update:year', val.year().toString());
        },
    },
};
</script>