skip days that doesnt exists

remotes/origin/hasaccess
Sanasol 8 years ago
parent 042b8b5c38
commit bad6b9ce76
  1. 10
      web/src/components/CourseRedactor.vue

@ -948,10 +948,12 @@
console.log('data', i, now.getDay(), weekday, now, moment(now).format("D MMM"));
options.push({
title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`,
value: moment(now).format('YYYY-MM-DD')
});
if(schedule[weekday]) {
options.push({
title: `${schedule[weekday]} (${this.weekdays[weekday]}, ${moment(now).format("D MMM")})`,
value: moment(now).format('YYYY-MM-DD')
});
}
}
console.log('options',options);

Loading…
Cancel
Save