Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Ux Calendar Link

Ux Calendar Link Laravel Package

symfony/ux-calendar-link

Symfony UX Calendar Link provides a simple Twig helper for adding “add to calendar” links to Symfony apps. Generate Google, Outlook, and ICS event links with minimal configuration, letting users save events without building calendar integrations yourself.

View on GitHub
Deep Wiki
Context7

Generates 'Add to calendar' links for Google, Outlook, Office 365 and iCalendar (.ics) in Twig templates.

Frequently asked questions about Ux Calendar Link
How do I install symfony/ux-calendar-link?
Install it with Composer by running composer require symfony/ux-calendar-link. With Symfony Flex the recipe usually handles the wiring; without Flex you may need to make sure Twig components and the package's template namespace are configured. Once installed, the component is available in any Twig template with no asset build step required for the core links.
Does symfony/ux-calendar-link work in Laravel or plain PHP?
It is built as a Symfony UX Twig component, so it expects Symfony's Twig component setup rather than Blade or a Laravel service provider. There is no Laravel package wrapper or Blade directive, so integrating it into a Laravel app means fighting the framework assumptions. If you are on Laravel, a framework-agnostic library such as spatie/calendar-links produces the same Google, Outlook, and ICS links.
Which Symfony and PHP versions are supported?
Symfony UX packages follow Symfony's release cycle, so current releases target the maintained Symfony 6.4 and 7.x branches on modern PHP 8 runtimes. Because this is a Twig component, you also need the Twig and Twig component packages that ship with those Symfony versions. Always check the require constraints in the package's composer.json before upgrading a legacy application.
Do I need JavaScript or a build step to use it?
No. The Google Calendar, Outlook, and ICS links are generated server-side in Twig, so there is no Stimulus controller, no npm dependency, and no asset compilation involved. You can add your own JavaScript afterwards for dropdowns, modals, or copy-to-clipboard behaviour if you want a richer UI. This also means the links work with JavaScript disabled and are indexable by crawlers.
Which calendar providers and clients are supported?
The component generates links for Google Calendar and Outlook, plus a downloadable ICS file. Because ICS is the universal format, the download also works with Apple Calendar, Thunderbird, and most mobile calendar apps. That combination covers the large majority of visitors without any per-provider API integration or authentication.
How do I create an all-day event instead of a timed one?
The component supports all-day events, so you pass dates rather than date-times and the generated links mark the event as spanning full days. In the ICS output that becomes a date value instead of a timestamp, which is what calendar clients expect for all-day entries. Check the documented attributes for your installed version to confirm the exact option name, and remember an all-day end date is typically exclusive in ICS.
How do I handle time zones so the event shows the right local time?
Pass the event's time zone through the component's time zone attribute so each provider receives an unambiguous moment in time. Google and Outlook links accept a time zone parameter alongside the dates, while the ICS file uses either UTC timestamps or a TZID reference. Setting it explicitly avoids the classic off-by-one-hour bug for attendees in other regions and for events around daylight saving changes.
Can I customise the title, description, location, or which links are rendered?
Title, start and end, location, description, and time zone are all passed as component attributes and are carried into every generated link, including the ICS file. Because the component just renders plain anchor markup, you control presentation by wrapping it in your own HTML and CSS or by rendering it only on the pages where you want the action. Keep descriptions reasonably short, since all of that text is URL-encoded into the provider links.
How do I test the generated calendar links?
Render the component in a Twig or functional test and assert on the expected href values, since the output is deterministic HTML. For the ICS download you can request the URL and assert on the response body containing the expected DTSTART, SUMMARY, and LOCATION lines. Standard Symfony WebTestCase and KernelTestCase assertions cover this without any special test helpers.
Are there any production or security concerns?
There are no runtime API calls, API keys, or rate limits, because the URLs are built entirely server-side, so the links are safe to cache and to render on high-traffic event pages. Twig's autoescaping handles user-supplied titles and descriptions in the HTML output, but you should still validate and trim event data before it reaches the template. The main practical limit is URL length on provider links when descriptions are very long, so consider truncating marketing copy.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect