<template>
    <v-row dense>
        <v-col cols="12">
            <cs-date-interval-box 
                v-if="!! activeRecord"
                ref="FirstControl"
                :control="controls.completedinterval"
                :errors="errorsManager.ByField('completedinterval')"
                :value="controls.completedinterval.GetRange(activeRecord.date_from, activeRecord.date_to)"
                @input="controls.completedinterval.SetRangeValue($event, activeRecord, 'date_from', 'date_to')"
            />
        </v-col>
    </v-row>
</template>

<script>
    export default {
        props: {
            editable: {required: true},
        },

        computed: {
            form() {
                return this.editable.form;
            },
        },

        components: {
            CsDateIntervalBox: require('@CsVueComp/controls/dates/CsDateIntervalBox').default,
        },
        
        mixins: [
            require('@CsVueMix/Forminput/Forminput')
        ],

        name: 'DtCursNameEdit',
    }
</script>