calendar offset
gitea/salix/test This commit looks good
Details
gitea/salix/test This commit looks good
Details
This commit is contained in:
parent
5ec352b71a
commit
a389ca46a2
|
@ -93,7 +93,7 @@ export default class Calendar extends Component {
|
|||
}
|
||||
|
||||
applyOffset(date) {
|
||||
// date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
|
||||
date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
|
||||
}
|
||||
|
||||
repaint() {
|
||||
|
@ -133,11 +133,13 @@ export default class Calendar extends Component {
|
|||
date.getFullYear(),
|
||||
date.getMonth(), day);
|
||||
|
||||
this.applyOffset(newDate);
|
||||
|
||||
let event = this.events.find(event => {
|
||||
return event.date >= newDate && event.date <= newDate;
|
||||
});
|
||||
console.log(this.events);
|
||||
console.log(newDate);
|
||||
|
||||
|
||||
/* if (curDate >= newDate && curDate <= newDate)
|
||||
color = 'orange'; */
|
||||
|
|
Loading…
Reference in New Issue