mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 21:19:43 -08:00
🐛 Fix iCalendar month bug (#2644)
This commit is contained in:
parent
ac545b2573
commit
95542a5a8d
|
@ -313,14 +313,19 @@ export class ICalendar implements INodeType {
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||||
let fileName = 'event.ics';
|
let fileName = 'event.ics';
|
||||||
|
|
||||||
|
let eventStart = moment(start).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray;
|
||||||
|
eventStart[1]++;
|
||||||
|
let eventEnd = moment(end).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray;
|
||||||
|
eventEnd[1]++;
|
||||||
|
|
||||||
if (additionalFields.fileName) {
|
if (additionalFields.fileName) {
|
||||||
fileName = additionalFields.fileName as string;
|
fileName = additionalFields.fileName as string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: ics.EventAttributes = {
|
const data: ics.EventAttributes = {
|
||||||
title,
|
title,
|
||||||
start: (moment(start).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray),
|
start: eventStart,
|
||||||
end: (moment(end).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray),
|
end: eventEnd,
|
||||||
startInputType: 'utc',
|
startInputType: 'utc',
|
||||||
endInputType: 'utc',
|
endInputType: 'utc',
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue