forwardemail / caldav-adapter

CalDAV server for Node.js and Koa. Modernized and maintained for @forwardemail
https://forwardemail.net
MIT License
27 stars 9 forks source link

Allday events not working properly #4

Closed theoneandobi closed 3 years ago

theoneandobi commented 4 years ago

Hi, We have implemented your adapter, but are currently having issues with allDay events. They will not get displayed as events that are for the whole day (or multiple days) but they will show as events that block the whole day.

I tried to pass a moment object for Start and end date, as well as a date object, but the result is the same.

I am pretty sure the problem is that our allDay events are from gmt+2 time zone, but can’t find a solution. In what format should i put the start and end date for allDay events to work?

sedenardi commented 4 years ago

Hi there, thanks for reaching out. Currently this library doesn't support all-day events, as it wasn't a use case when I initially developed the library. However, I'm open to receiving pull requests to add the feature.

It would involve checking whether the ical parser's CalendarComponent dates have the dateOnly flag set to true, creating a new field on this library's CalDavEvent to indicate it's an all-day event, and then setting the allDay field when creating the EventData object to create the ICS string.

sedenardi commented 3 years ago

Closing this issue for now. Feel free to request that it be reopened if you'd like to implement the necessary changes.