PHPackages                             labapawel/calendar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. labapawel/calendar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

labapawel/calendar
==================

Filament Calendar Component

v1.0.0(4mo ago)00MITBladePHP ^8.1

Since Jan 2Pushed 4mo agoCompare

[ Source](https://github.com/labapawel/calendar)[ Packagist](https://packagist.org/packages/labapawel/calendar)[ RSS](/packages/labapawel-calendar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Filament Calendar Component
===========================

[](#filament-calendar-component)

A custom calendar component for FilamentPHP, supporting single date and date range selection.

[![image.png](image.png)](image.png)

Installation
------------

[](#installation)

You can install the package via composer. Since this is a local package under development, add it to your `composer.json` repositories:

```
"repositories": [
    {
        "type": "path",
        "url": "../path/to/calendar"
    }
]
```

Then require it:

```
composer require labapawel/calendar:@dev
```

Configuration
-------------

[](#configuration)

Optionally, you can publish the views using:

```
php artisan vendor:publish --tag="calendar-views"
```

Configuration &amp; Usage
-------------------------

[](#configuration--usage)

### Basic Usage

[](#basic-usage)

In your Filament Resource or Form:

```
use LabaPawel\Calendar\Forms\Components\Calendar;

Calendar::make('appointment_date')
    ->label('Appointment Date')
```

### Date Range Selection

[](#date-range-selection)

To enable picking a start and end date (which enables the "range" mode internally):

```
Calendar::make('booking_period')
    ->range()
```

### Double View (Two Months)

[](#double-view-two-months)

For a better user experience when selecting ranges, you can show two consecutive months side-by-side. This layout automatically stacks on mobile devices.

```
Calendar::make('booking_period')
    ->range()
    ->double() // Enables 2-month view
    ->columnSpanFull() // Recommended for double view
```

### Mapping Attributes (Direct Model Saving)

[](#mapping-attributes-direct-model-saving)

If you ignore the standard JSON storage and want to save directly to `start_date` and `end_date` columns on your model, use `startAttribute()` and `endAttribute()`.

**Note:** This works automatically for **both** creating and editing records. You do **not** need to add hidden fields or model mutators.

```
Calendar::make('calendar_fields') // Name can be anything unique
    ->range()
    ->double()
    ->startAttribute('start_date') // Column for start date
    ->endAttribute('end_date')     // Column for end date
    ->columnSpanFull()
```

**Database Requirements:**The columns (`start_date`, `end_date`) must be nullable or have default values if they are optional. The component saves dates in `YYYY-MM-DD` format.

Localization
------------

[](#localization)

The package supports English and Polish. You can publish translations if needed (currently loaded automatically).

To customize translations, you can create files in `resources/lang/vendor/calendar/`.

Styling
-------

[](#styling)

The component uses an external CSS file for styling. If you don't see the styles applied (e.g., date selection color), ensure your assets are published or optimized.

```
php artisan filament:assets
php artisan optimize:clear
```

You can customize the appearance by overriding the CSS variables in your global CSS or by modifying the published `resources/css/calendar.css` file.

Available variables:

- `--c-primary`: Main color (defaults to blue).
- `--c-selected-bg`: Background color for selected dates.
- `--c-bg`, `--c-text`, `--c-border`: Theme colors (light/dark mode supported).

Troubleshooting
---------------

[](#troubleshooting)

- **Missing styles?** Run `php artisan optimize:clear`.
- **Wrong date format?** Dates are stored as `Y-m-d` by default to ensure consistency with your database.
- **Missing text?** The component uses the browser's `Intl.DateTimeFormat` for day and month names, defaulting to Polish (`pl-PL`). Ensure your browser supports this API (all modern ones do).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance75

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

137d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a4da4e4cc8ec5a40de84818ce38f04f5117cf3cecbf5282587d1f1fe3abc9b8f?d=identicon)[labapawel](/maintainers/labapawel)

---

Top Contributors

[![labapawel](https://avatars.githubusercontent.com/u/11938667?v=4)](https://github.com/labapawel "labapawel (4 commits)")

### Embed Badge

![Health badge](/badges/labapawel-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/labapawel-calendar/health.svg)](https://phpackages.com/packages/labapawel-calendar)
```

###  Alternatives

[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
