added offset calendar remove selection
gitea/salix/test This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-02-25 12:22:04 +01:00
parent 7a7b2c67d0
commit 23ed5e4ddf
2 changed files with 1 additions and 13 deletions

View File

@ -139,15 +139,6 @@ export default class Calendar extends Component {
return event.date >= newDate && event.date <= newDate; return event.date >= newDate && event.date <= newDate;
}); });
console.log(this.events);
console.log(newDate);
/* if (curDate >= newDate && curDate <= newDate)
color = 'orange'; */
/* if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 6)
color = 'light-blue'; */
if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 0) if (newDate.getMonth() === this.currentMonth.getMonth() && newDate.getDay() == 0)
color = 'red'; color = 'red';

View File

@ -116,10 +116,7 @@ class Controller {
if (event && !event.isRemovable) if (event && !event.isRemovable)
return false; return false;
// FIXME - Date offset dates.push(day.date);
let date = new Date(day.date);
date.setHours(0, 0, 0, 0);
dates.push(date);
this.stMonth.removeEvent(day.date); this.stMonth.removeEvent(day.date);
this.stMonth.repaint(); this.stMonth.repaint();