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

Tests Styling Laravel v9.x Filament v3.x PHP 8.1 Packagist

Use Flatpickr as your datepicker in the Filament Forms and Panels.

Supported Versions

Package Version Supported Filament Version(s)
v2.x Filament v2
v3.x Filament v3
v4.x Filament v3, Filament v4

Installation

Install the package via composer:

Run the installation command to publish the assets and config file:

This will publish the config file to config/flatpickr.php and the assets to public/vendor/flatpickr. The command will also ask you if you would like to overwrite the existing assets and config files if they exist. If you choose to overwrite, the existing files will be replaced with the new ones. This is useful if you want to update the package to the latest version there have been changes to the config file or assets in the latest version.

If you are upgrading from a previous version be sure to run the following to ensure assets are up to date

Usage

You can do a lot with just one Component: Flatpickr You can use the Flatpickr component from this package as:

Most of the fluent config methods are similar to Flatpickr's official options in naming.

This package is also an extension of Filament's DateTimePicker, so most of the methods are similar to the ones in the DateTimePicker component. You can use the Flatpickr component as a drop-in replacement for the DateTimePicker component.

Here are some examples of the methods. Refer to Flatpickr's Official Documentation for details on each of the configurations.

Examples

Flatpickr Themes (See Flatpickr Docs for more Details)

Note: I highly recommend that you use the DEFAULT theme, which is styled using tailwind to conform to the filament design system. The other themes come with the flatpickr javascript package and may not conform to your Filament themeing, including dark mode.

You can set the package's theme globally under the theme config in the config/flatpickr.php file. The config accepts a \Coolsam\Flatpickr\Enums\FlatpickrTheme enum value. The \Coolsam\Flatpickr\Enums\FlatpickrTheme::DEFAULT theme is already set by default and conforms to the filament design system.

See the screenshots below for the different themes.

State Types

The package supports the following state types:

Screenshots

Single Date Picker

image

Multiple Date Picker

image

Date Range Picker

image

Date-Time Picker

image

Time-Only Picker

image

Show Multiple Months

image

Week Picker

image

Month Picker

image

Flatpickr Themes

DEFAULT

image

AIRBNB

image

LIGHT

image

DARK

image

CONFETTI

image

MATERIAL_BLUE

image

MATERIAL_GREEN

image

MATERIAL_ORANGE

image

MATERIAL_RED

image

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of flatpickr with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^3
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 ....