Copilot · Community sample

Holiday Planner - Working Days, Long Weekends, and Regional Holidays in Copilot Chat

Five SPFx Copilot Components and one declarative agent that calculate working days, find long weekends with bridge-day suggestions, list holidays, check dates, and compare office calendars directly in Copilot chat.

Copilot componentReactSPFx 1.24.1
Expanded Holiday Planner dashboard with next holiday, next long weekend, working-day summary, holiday calendar, and holiday details.

The idea behind the sample

Holiday Planner is a SharePoint Copilot App built as five SPFx 1.24 Copilot Components under a single declarative agent. Each tool renders a live React card in the Copilot conversation: an inclusive working-day count, the next long weekend with the working days until it and any bridge-day suggestion, a full-year, month, or upcoming holiday list, a working-day check for a specific date or named holiday, and a side-by-side comparison of regional calendars.

Expanding a card opens a shared dashboard with calendar tabs, holiday details, and a Vacation Optimizer. Holiday data is read from a SharePoint list under the signed-in user's delegated identity, configured through a tenant storage entity, with demo data as a labelled fallback. The default country resolves from the query, a OneDrive-saved preference, the user's profile, or browser hints, and the pure planning calculations are unit tested.

Make it your own

Start with the author's setup instructions, explore the implementation, and adapt the pattern to your environment. Sample code stays in its original repository, together with its requirements, license and contribution history.

Read the source documentation

A closer look

Keep exploring

Keep the ideas flowing

Back to all possibilities
Microsoft 365 and Power Platform Community Contributor badge

Sharing is caring.

Share what you know.

Contribute a sample, improve the docs or help someone get started. Sample contributors can opt in to the PnP Recognition Program and share their community contributor badge.

Have something to show? Sign up for a community call demo. Fill in the form and we'll arrange a slot based on your availability.