mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -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;
|
||||
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) {
|
||||
fileName = additionalFields.fileName as string;
|
||||
}
|
||||
|
||||
const data: ics.EventAttributes = {
|
||||
title,
|
||||
start: (moment(start).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray),
|
||||
end: (moment(end).toArray().splice(0, (allDay) ? 3 : 6) as ics.DateArray),
|
||||
start: eventStart,
|
||||
end: eventEnd,
|
||||
startInputType: 'utc',
|
||||
endInputType: 'utc',
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue