Sp-dev-fx-webparts: react-calendar - All Day Event toggle changes dates/causes event to span over multiple days

Created on 1 Dec 2020  路  6Comments  路  Source: pnp/sp-dev-fx-webparts

Sample (which sample are you having trouble with)

react-calendar
https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-calendar

Authors

Jo茫o Mendes (@joaojmendes)
Mohamed Derhalli (@derhallim)
Hugo Bernier (@bernier,聽Tahoe Ninjas)
Nanddeep Nachan (@nanddeepn)

Expected or Desired Behavior

All day event to display on set date after creation.

Observed Behavior

The All Day Event-toggle seems to "add" hours to the start date - causing it to span over multiple days.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Click on calendar to create new event.
  2. Fill in required information and toggle All Day Event ?
  3. Save event.
  4. Calendar view now lists the created event as a two day event.
    Re-opening the created event shows entirely different end date and All Day Event is toggled off.
  5. Re-setting the All Day Event-toggle without changing date causes the two-day event to now be a three-day event and so on.

Environment Details (Development & Target environment)

  • OS: Windows 10
  • Target Environment: SharePoint Online
  • Framework: [e.g. .NET Framework v3.x | .NET Core v3.x | Node.js v6/v8/v10/v12]
  • Browser(s): Chrome, Chromium Edge
  • Tooling: [e.g. VS Code | SPFx v1.10.0 | Visual Studio 2019]
  • Additional details: The more context you can provide, the easier it is (and therefore quicker) to help.

Additional context

  1. Adding the event.
    1
  2. Event listed in the calendar - now spanning over two days.
    2
  3. Opening freshly created event shows new date and All Day Event toggle off.
    3

Most helpful comment

Hi @lulzie,

I will check this issue.

@hugoabernier Can you assign this to me?

All 6 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Hi @lulzie,

I will check this issue.

@hugoabernier Can you assign this to me?

@Abderahman88 quick note, I am not surprised to see this issue and I actually warned about it:
https://github.com/pnp/sp-dev-fx-webparts/issues/1526#issuecomment-701608644

I believe the issue is not with the script itself but rather with the way SP saves all day events. Good luck with the investigation!

The fix is under way. Stay tuned 馃摵

FixCalendarAllDays

PR is made. If there are still issues, let me know.

Hi @lulzie I have just merged a pull request from @Abderahman88 which -- at least the tests I have performed -- seems to fix the issue.

If you still run into the issue after updating the sample to the latest one, feel free to open a new issue.

Was this page helpful?
0 / 5 - 0 ratings