Download the PHP package coolsam/flatpickr without Composer

On this page you can find all versions of the php package coolsam/flatpickr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flatpickr

Filament Flatpickr

CI Coverage Latest Version on Packagist Total Downloads

A Filament form field powered by Flatpickr — date, time, range, week, month, year, and multi-date picking with a fluent API.

Filament Flatpickr preview

Supported versions

Package Filament Laravel PHP
v5.x (current) 4.x, 5.x 11.x – 13.x 8.2 – 8.5 (PHP 8.5 from Laravel 12+; Laravel 13 from PHP 8.3+)
v4.x 3.x 10.x – 11.x 8.1 – 8.3
v2.x 2.x 9.x – 10.x 8.0 – 8.2

Installation

Install the package with Composer:

Publish assets and configuration:

This publishes config/flatpickr.php and assets to public/vendor/flatpickr. You will be prompted to overwrite existing files when upgrading.

After upgrading, refresh Filament assets:

Quick start

Picker modes

One component covers every Flatpickr mode you need:

Mode Helper Typical format
Date Flatpickr::make('date') Y-m-d
Date & time ->time(true) or ->timePicker() Y-m-d H:i / H:i
Range ->rangePicker() array of date strings, or two fields with ->rangeEnd()
Multiple dates ->multiplePicker() array of date strings
Week ->weekPicker() W Y
Month ->monthPicker() Y-m
Year ->yearPicker() Y

Short examples

Configuration

Most fluent methods mirror Flatpickr's options. The API is inspired by Filament's date/time fields and works as a drop-in alternative with Flatpickr-specific behaviour.

See the Flatpickr documentation for details on each option.

State types

Picker Dehydrated state
Date, time, week, month, year string or CarbonInterface
Range, multiple array of date strings or CarbonInterface instances
Range with ->rangeEnd('ends_at') Two separate fields: start and end strings or CarbonInterface instances

Split range across two fields

When your model uses separate starts_at and ends_at columns, bind the range picker to the start field and name the end field explicitly. One picker is shown; both attributes are hydrated, synced live, and dehydrated on save.

Do not add a second Flatpickr on ends_at. Validation rules on ends_at (for example after:starts_at) still work because the end value is kept in sync while the user selects a range.

Date & time range

Use ->time(true) with a format that includes hours and minutes. displayFormat() controls what the user sees in the input (Flatpickr tokens, not PHP date() tokens). Storage and dehydration still use format().

Ensure your model casts both columns as datetime. The picker UI lets you choose a date and time for each end of the range in one calendar.

See RFC 0001 for the full design.

Themes

Set the global theme in config/flatpickr.php using a FlatpickrTheme enum value:

Recommendation: Use the DEFAULT theme. It is styled with Tailwind to match Filament, including dark mode. Bundled Flatpickr themes may not align with your panel styling.

Theme previews are included in the screenshots below.

Screenshots

Picker modes

Single date

Single date picker

Multiple dates

Multiple date picker

Date range

Date range picker

Date & time

Date-time picker

Time only

Time-only picker

Multiple months

Show multiple months

Week

Week picker

Month

Month picker

Theme gallery

Default (recommended)

Default theme

Airbnb

Airbnb theme

Light

Light theme

Dark

Dark theme

Confetti

Confetti theme

Material Blue

Material Blue theme

Material Green

Material Green theme

Material Orange

Material Orange theme

Material Red

Material Red theme

Testing

Changelog

See CHANGELOG for release notes.

Contributing

See CONTRIBUTING for guidelines.

Security

Report vulnerabilities according to our security policy.

Credits

License

The MIT License. See LICENSE.md.


All versions of flatpickr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/forms Version ^4.0|^5.0
filament/support Version ^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coolsam/flatpickr contains the following files

Loading the files please wait ...