0๐
โ
<script>
export default {
data() {
return {
showModal: false
};
},
mounted(){
let currentDate = new Date();
if ((currentDate.getDay() == 0 && currentDate.getHours() < 18 )
|| (currentDate.getDay() == 6 && currentDate.getHours() > 18)) {
this.showModal = true
}
}
}
</script>
Source:stackexchange.com