add2cal / add-to-calendar-button

Reliably create beautiful Add to Calendar Buttons, where people can add events to their calendars. Without the hustle and unsupported cases.
https://add-to-calendar-button.com
Other
1.36k stars 114 forks source link

[Bug]: subscribe button doesn't render unless there is a startDate #572

Closed justin-hackin closed 7 months ago

justin-hackin commented 7 months ago

What happened?

When using react component to create an ics subscribe button, the component doesn't render unless there is a startTime. It's confusing, why does a subscription need a start time? The typescript types don't seem to indicate this as a required property either.

How to reproduce?

Render this:

<AddToCalendarButton
        name={'Cal'}
        options={['Apple', 'Google', 'Yahoo', 'iCal']}
        icsFile={'http://......'}
        subscribe
    ></AddToCalendarButton>

and then observe button doesn't render. Add startDate, notice button renders.

Screenshots & more

No response

System & Environment

  1. Apple M1 , macOS Ventura Version 13.4 (22F66) , Chrome Version 122.0.6261.129 (Official Build) (arm64), package version "add-to-calendar-button-react": "^2.6.8", via npm

P.S. It's better to populate this with template text rather than use a placeholder to list requirements because as soon as the reporter types anything they lose sight of the requirements.

jekuer commented 7 months ago

Changed with v2.6.9

justin-hackin commented 6 months ago

Changed with v2.6.9

Thanks for addressing this 🎉