<template>
  <datetime-picker v-model="valueCopy" :schema="schema" :required="required" :readonly="readonly" :date-only="true"></datetime-picker>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
import DatetimePicker from './datetime-picker.vue';
import { ValueSync } from '../../tools/decorators';

@Component({
  components: {
    DatetimePicker
  }
})
export default class DatePicker extends Vue {
  @ValueSync('value', { type: [Date, String] }) valueCopy!: Date | string;
  @Prop(Object) readonly schema!: object;
  @Prop({ default: false }) readonly required!: boolean;
  @Prop({ default: false }) readonly readonly!: boolean;
}
</script>
