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) {
|
applyOffset(date) {
|
||||||
// date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
|
date.setTime(date.getTime() - date.getTimezoneOffset() * 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
repaint() {
|
repaint() {
|
||||||
|
@ -133,11 +133,13 @@ export default class Calendar extends Component {
|
||||||
date.getFullYear(),
|
date.getFullYear(),
|
||||||
date.getMonth(), day);
|
date.getMonth(), day);
|
||||||
|
|
||||||
this.applyOffset(newDate);
|
|
||||||
|
|
||||||
let event = this.events.find(event => {
|
let event = this.events.find(event => {
|
||||||
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)
|
/* if (curDate >= newDate && curDate <= newDate)
|
||||||
color = 'orange'; */
|
color = 'orange'; */
|
||||||
|
|
Loading…
Reference in New Issue