PHPackages                             chengkangzai/filament-date-of-birth-picker - 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. chengkangzai/filament-date-of-birth-picker

ActiveLibrary

chengkangzai/filament-date-of-birth-picker
==========================================

Native dropdown picker for birthday

03[3 PRs](https://github.com/chengkangzai/filament-date-of-birth-picker/pulls)PHPCI passing

Since Oct 13Pushed 1mo agoCompare

[ Source](https://github.com/chengkangzai/filament-date-of-birth-picker)[ Packagist](https://packagist.org/packages/chengkangzai/filament-date-of-birth-picker)[ RSS](/packages/chengkangzai-filament-date-of-birth-picker/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Filament Date of Birth Picker
=============================

[](#filament-date-of-birth-picker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/1eeed1087dc7556811070da85ed798f5b325c633852beca2d21241466d757964/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368656e676b616e677a61692f66696c616d656e742d646174652d6f662d62697274682d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chengkangzai/filament-date-of-birth-picker)[![GitHub Tests Action Status](https://camo.githubusercontent.com/08a62a868c53fda442d541c2c62dccd79ce73f4f5aebf7e515f372955c33a583/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368656e676b616e677a61692f66696c616d656e742d646174652d6f662d62697274682d7069636b65722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/chengkangzai/filament-date-of-birth-picker/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7a69b9d40b41b9d4744e64c7d0fa9d9cbed1c8952ba258e09a9a890ed3ae35bb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6368656e676b616e677a61692f66696c616d656e742d646174652d6f662d62697274682d7069636b65722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/chengkangzai/filament-date-of-birth-picker/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/5f9d4d8c2f7d92b98248213c8f29bb9f18b2850056e91e6177cb5582d09faab5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368656e676b616e677a61692f66696c616d656e742d646174652d6f662d62697274682d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chengkangzai/filament-date-of-birth-picker)

A native dropdown picker for date of birth selection in Filament forms. This package provides three separate dropdown components for day, month, and year selection, making it easy for users to select their date of birth without using a calendar picker or manual input.

Features:

- Three separate dropdown components (day, month, year)
- Smart day calculation based on selected month and year
- Leap year handling for February
- Configurable year range
- Built-in validation
- Seamless integration with Filament forms

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

[](#installation)

You can install the package via composer:

```
composer require chengkangzai/filament-date-of-birth-picker
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="filament-date-of-birth-picker-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="filament-date-of-birth-picker-config"
```

Optionally, you can publish the views using

```
php artisan vendor:publish --tag="filament-date-of-birth-picker-views"
```

This is the contents of the published config file:

```
return [
];
```

Usage
-----

[](#usage)

Add the DateOfBirthPicker to your Filament form:

```
use CCK\FilamentDateOfBirthPicker\DateOfBirthPicker;

// In your Filament form
DateOfBirthPicker::make('date_of_birth')
    ->label('Date of Birth')
    ->required()
```

### Advanced Usage

[](#advanced-usage)

You can customize the year range and date constraints:

```
DateOfBirthPicker::make('date_of_birth')
    ->label('Date of Birth')
    ->startYear(1900)
    ->endYear(2010)
    ->minDate('1900-01-01')
    ->maxDate('2010-12-31')
    ->required()
```

### Internationalization

[](#internationalization)

Customize month labels for different languages:

```
DateOfBirthPicker::make('date_of_birth')
    ->monthLabels([
        'Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin',
        'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'
    ])
```

Or configure globally in the config file:

```
// config/date-of-birth-picker.php
'localization' => [
    'month_labels' => [
        'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
        'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'
    ],
    'placeholder_labels' => [
        'day' => 'Día',
        'month' => 'Mes',
        'year' => 'Año',
    ],
    'validation_message' => 'Por favor seleccione una fecha válida.',
],
```

### Validation

[](#validation)

The component includes built-in validation:

- Ensures the date is valid
- Checks that the date is not in the future (configurable)
- Handles leap years correctly
- Supports min/max date constraints

You can add additional validation rules:

```
DateOfBirthPicker::make('date_of_birth')
    ->label('Date of Birth')
    ->rules(['required', 'date', 'before:2010-01-01'])
```

### Configuration

[](#configuration)

Publish the configuration file to customize default behavior:

```
php artisan vendor:publish --tag="filament-date-of-birth-picker-config"
```

Available configuration options:

- Default year range
- Date format
- Validation rules
- Internationalization settings
- Date constraints
- Accessibility features

### Performance Features

[](#performance-features)

- **Cached Arrays**: Year and month options are cached for optimal performance
- **Smart Date Validation**: Client-side validation with leap year support
- **Optimized Assets**: Minified CSS and JavaScript with automatic purging

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [chengkangzai](https://github.com/chengkangzai)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance59

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

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

---

Top Contributors

[![chengkangzai](https://avatars.githubusercontent.com/u/43839286?v=4)](https://github.com/chengkangzai "chengkangzai (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/chengkangzai-filament-date-of-birth-picker/health.svg)

```
[![Health](https://phpackages.com/badges/chengkangzai-filament-date-of-birth-picker/health.svg)](https://phpackages.com/packages/chengkangzai-filament-date-of-birth-picker)
```

PHPackages © 2026

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