0👍
You mean
Options API
<script>
import Datepicker from "vue3-date-time-picker";
import "vue3-date-time-picker/dist/main.css";
export default {
components: { Datepicker },
data() {
return {
date: new Date("2021-12-31"),
};
},
};
</script>
Composition API
<script>
import { ref } from "vue";
import Datepicker from "vue3-date-time-picker";
import "vue3-date-time-picker/dist/main.css";
export default {
name: "Demo",
components: {
Datepicker,
},
setup() {
const date = ref(new Date("2021-12-31"));
return {
date,
};
},
};
</script>
Source:stackexchange.com