import { Component, Prop, Vue } from 'vue-property-decorator';

@Component
export default class XDateRange extends Vue {
  @Prop() private from!: Date;
  @Prop() private to!: Date;
  @Prop() private listStyle!: String;
  @Prop() private filled!: Boolean;

  private inputHandler($event: any, field: string): void {
    this.$emit(`update:${field}`, $event);
    this.$emit('input', {
      from: this.from,
      to: this.to,
    });
  }
}
