corvet / light-field-bundle
Custom fields with masked for Symfony 8
Package info
github.com/corvet/light-field-bundle
Type:symfony-bundle
pkg:composer/corvet/light-field-bundle
v1.0.26
2026-06-26 21:19 UTC
Requires
- php: ^8.1
- symfony/console: ^8.0 || ^7.4 || ^6.4
- symfony/form: ^8.0 || ^7.4 || ^6.4
- symfony/framework-bundle: ^8.0 || ^7.4 || ^6.4
- symfony/stimulus-bundle: ^3.0 || ^2.0
- symfony/twig-bundle: ^8.0 || ^7.4 || ^6.4
This package is auto-updated.
Last update: 2026-07-26 21:33:22 UTC
README
Custom masked date input field with integrated Flatpickr calendar and custom footer buttons (Today / Clear) for Symfony 8+ and AssetMapper (Symfony UX).
Features
- Inputmask integration (formats text as
dd.mm.yyyydynamically). - Flatpickr integration (dark theme by default).
- Custom Footer Buttons: Single-click buttons for "Today" and "Clear" that work perfectly with the input mask without stripping data.
- Zero Node/NPM dependencies (built natively for Symfony AssetMapper).
Installation
1. Download the Bundle
Run the following command in your Symfony project:
composer require corvet/light-field-bundle
2. Install JavaScript Dependencies
Since this bundle relies on flatpickr and inputmask via AssetMapper, import them into your application's importmap.php:
php bin/console importmap:require flatpickr inputmask bin/console importmap:require flatpickr/dist/themes/dark.css
Usage
Simply use LightDateType::class in your Symfony forms:
use Corvet\LightFieldBundle\Form\LightDateType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; class OrderType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options): void { $builder->add('createdAt', LightDateType::class, [ 'label' => 'Select Date', ]); } }
License
MIT License. See LICENSE for more information.