Merge pull request #2148 from mohammadamer/patch-1
Fix All Day event issue
This commit is contained in:
commit
f80af9fe50
|
@ -52,21 +52,13 @@ export default class parseRecurrentEvent {
|
||||||
return str.split(' ');
|
return str.split(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public parseDate(date: any, allDay: any) {
|
public parseDate(date: any, allDay: any) {
|
||||||
if (typeof date == 'string') {
|
if (typeof date == 'string') {
|
||||||
if (allDay) {
|
return new Date(date);
|
||||||
if (date.lastIndexOf('Z') == date.length - 1) {
|
|
||||||
const dt = date.substring(0, date.length - 1);
|
|
||||||
return new Date(dt);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new Date(date);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public parseEvent(e: any, start: any, end: any) {
|
public parseEvent(e: any, start: any, end: any) {
|
||||||
if (e.fRecurrence == '0' || e.fRecurrence == '4') {
|
if (e.fRecurrence == '0' || e.fRecurrence == '4') {
|
||||||
e.EventDate = new Date(this.parseDate(e.EventDate, e.fAllDayEvent));
|
e.EventDate = new Date(this.parseDate(e.EventDate, e.fAllDayEvent));
|
||||||
|
|
Loading…
Reference in New Issue