Notifications set in the past are triggered directly

If you set a notification with a date that is inferior to ‘now’ (new Date())

The notification will be immediately trigger. I guess there is some use case were it’s useful.

In my case it’s problematic because I manage a calendar, and I want people able to set (reminder) notification for recurring events.

Example:

  • I add an event now, repeating daily
  • I set a daily reminder (notification) on that event one hour before
  • First notification triggered directly because set in the past, one hour before now for the first event (or it shouldn’t)

So I had to develop a system that recognise if it’s repeated reminder and start it later if the first was set in the past

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.