Open tahademirer opened 3 years ago
@tahademirer do u already have found a solution for this problem? I need to disable some hours to. Because when the store is closed the hours needs to be hidden or disabled.
const now = this.$moment();
validHours(hour, dateParts) { if(!dateParts.date) { return false } const selectedDate = this.$moment(dateParts.date); if(selectedDate.isSame(this.now, 'day')) { return hour > this.now.hour(); } return hour; }
And pass this function as attribute to date picker as below:
<date-picker mode="dateTime" :minute-increment="30" trim-weeks :min-date="new Date()" :valid-hours="validHours"
Hi! I'm using your great component in 24 hours mode. How can I disable the hours of day which are passed? Thanks!