# Calendar

- Page: https://jiguang132.com/resources/daisyui/docs/calendar
- Resource: daisyUI (https://jiguang132.com/resources/daisyui.md)
- All guides: https://jiguang132.com/resources/daisyui/docs.md

daisyUI styles calendars rather than supplying one calendar API. Choose Cally, React Day Picker or Vanilla Calendar, install its dependency and preserve its selection events. Verify locale, bounds, time zones and instance cleanup.

## Installation and initialization

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
```

This is a native CSS plugin, not a React component import. Build Tailwind 4 with the daisyUI plugin and load the generated stylesheet before copying an example. See the included setup guide; do not override an existing project's React or Tailwind versions blindly.

```css
@import "tailwindcss";
@plugin "daisyui" { themes: light --default, dark --prefersdark; }
```

## Source and executable behavior

Source files preserve the original code fences, including original comments and demo strings. The $$ class prefix placeholder must be resolved for your plugin configuration: without a prefix, $$btn becomes btn. Copy every listed source file for the chosen example, combine HTML/CSS/JS appropriately and implement native events. The preview's reviewed event adapters are not a backend or an automatically installed application runtime.

## Complete first example

```html
<!--
* Import Cally web component from CDN
<script type="module" src="https://unpkg.com/cally"></script>

* Or install as a dependency:
npm i cally
* and import it in JS
import "cally";
-->

<calendar-date class="$$cally bg-base-100 border border-base-300 shadow-lg rounded-box">
  <svg aria-label="Previous" class="fill-current size-4" slot="previous" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M15.75 19.5 8.25 12l7.5-7.5"></path></svg>
  <svg aria-label="Next" class="fill-current size-4" slot="next" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="m8.25 4.5 7.5 7.5-7.5 7.5"></path></svg>
  <calendar-month></calendar-month>
</calendar-date>
```

## All runnable examples

### Cally calendar example

`calendar-1`

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
npm install cally@0.9.2
```

- `examples/calendar/block-0.html`

### Cally date picker example

`calendar-2`

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
npm install cally@0.9.2
```

- `examples/calendar/block-1.html`

### React Day Picker Example

`calendar-3`

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
npm install react@19.2.8 react-dom@19.2.8 react-day-picker@9.14.0
```

- `examples/calendar/block-2.txt`
- `examples/calendar/block-3.jsx`

### Vanilla Calendar Pro Example

`calendar-4`

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
npm install vanilla-calendar-pro@3.4.0
```

- `examples/calendar/block-4.txt`
- `examples/calendar/block-5.html`
- `examples/calendar/block-6.js`

### Vanilla Calendar Pro CDN Example

`calendar-5`

```bash
npm install -D tailwindcss@4.2.1 @tailwindcss/cli@4.2.1 daisyui@5.7.47
npm install vanilla-calendar-pro@3.4.0
```

- `examples/calendar/block-7.html`

Calendar implementations are separate alternatives, not interchangeable APIs. Install only the one selected. Inspect React peer versions before using the React example. Import cally before rendering its custom elements; initialize and destroy Vanilla Calendar explicitly. The upstream CDN sample is retained as source evidence; JGuang UI previews replace the CDN runtime with the pinned local npm module.

## Theme, accessibility and verification

Use native data-theme boundaries. Verify keyboard operation, labels, visible focus, disabled/invalid states where applicable, light/dark, mobile and reduced motion. Check your target browser's dialog, popover and CSS feature support. CSS classes do not supply unimplemented JavaScript or business services. Clean up timers and third-party instances; copying a command is not installation success.

## Source and license

https://github.com/saadeghi/daisyui/tree/c51f50130ffefb293179e6fce8de7ad3f307e45f

JGuang authors these bilingual practical notes; this is not a claim of translating the complete upstream documentation. Original Markdown, code and CSS remain available in the source viewer. Preserve MIT and separate dependency notices. All native-package notices are included conservatively, including build tools; no build binary or remote demo image is redistributed. Replace remote media with assets you are authorized to use. Commercial templates are outside this integration.

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
