<script setup>
import {computed} from 'vue';

const start = defineModel('start');
const end = defineModel('end');

const value = computed({
    get: () => [start.value, end.value],
    set: (val) => {
        start.value = val[0];
        end.value = val[1];
    }
});
</script>

<template>
    <a-range-picker
        v-model:model-value="value"
        format="YYYY-MM-DD HH:mm"
        v-bind="$attrs"
        show-time
        type="time-range">
    </a-range-picker>
</template>

<style scoped lang="scss">

</style>
