<template>
  <div class="grid gap-8">
    <div>
      <AisDatepicker @select="getSelection" v-model="selectedDate"></AisDatepicker>
    </div>
    <div>
      selection:
    </div>
    <pre>
    {{ displayContextEvent }}
  </pre>
  </div>
</template>

<script setup>
import {ref} from 'vue';
import AisDatepicker from "@/components/datepicker/AisDatepicker.vue";
/*All below conditions are true */
const today = new Date();
const selectedDate = ref(null);
const displayContextEvent = ref(null)
// const selectedDate = ref('2022-02-06');
// const selectedDate = ref(new Date(2022,1,9));
// const selectedDate = ref('2022-02-09');
// const selectedDate = ref(null);
// const selectedDate = ref('');

const getSelection = (event) => {
  displayContextEvent.value = event
}
</script>
