flatpickr-ce
v4.14.0
Published
A lightweight, powerful javascript datetime picker
Maintainers
Readme
flatpickr-ce - community edition of flatpickr
flatpickr-ce is a community-maintained edition of flatpickr, the lightweight, dependency-free datetime picker created by Gregory Petrosyan (chmln). The upstream repository hasn't had a release since 2022, so this repo picks up its open fixes and pull requests (context).
- Drop-in replacement: same API, options, themes and plugins; only the package name changes.
- Full git history, with the original MIT license and credits.
- Issues and pull requests are welcome here.
Install
npm install flatpickr-ceimport flatpickr from "flatpickr-ce";
import "flatpickr-ce/dist/flatpickr.css";
flatpickr("#date", { enableTime: true });Migrating from flatpickr
The API is unchanged, so swapping the package is enough. To keep your existing flatpickr imports (and keep the addons listed below working), install it under the old name with an npm alias:
npm install flatpickr@npm:flatpickr-ceLooking for an upstream issue?
We don't reply on flatpickr/flatpickr issues, so many threads there won't say a fix exists. To see where an upstream issue stands here, search the changelog for its number, or check the checklists by the year it was opened, which give every upstream issue and PR as fixed, answered, or won't fix: 2025–26, 2024, 2023, 2022, 2021, 2020, 2019. If you see someone there hitting a bug that's fixed here, feel free to point them to it.
What's changed since flatpickr 4.6.13
See the changelog for every release's fixes and the behavior changes to check when upgrading.
Features
- Dependency-free (no bloated bundles)
- Simple, polished UX
- Date + time input
- Range selections
- Ability to select multiple dates
- Can be used as just a time picker
- Display dates in a human-friendly format
- Easily disable specific dates, date ranges, or any date using arbitrary logic
- Week numbers
- 70+ locales
- 8 colorful themes (incl. dark and material)
- Numerous plugins
Compatibility
IE9 and up, Edge, iOS Safari 6+, Chrome 8+, Firefox 6+
Documentation
Demos and documentation: https://flatpickr.js.org. The API is the same, so everything there applies to flatpickr-ce.
Framework addons (they depend on the flatpickr package, so use the alias above):
- angular2+-flatpickr addon
- ember-flatpickr addon
- React Component
- Stimulus.js Controller
- Svelte Component
- vue-flatpickr component
- lit-flatpickr component
Options are trusted
A few options are inserted into the calendar as HTML, not text: prevArrow, nextArrow, what getWeek returns and confirmDate's confirmIcon. Like the rest of the config, they are meant to come from your code: don't build them from user input or other untrusted data without escaping it.
Contributing
Bug reports, triage and pull requests are all welcome. Fixes that are still open upstream can be reopened here.
To report a bug, start from this fiddle, which loads the latest flatpickr-ce from jsDelivr: reproduce the bug there, save it and link it in the issue.
npm install
npm test # typecheck + unit tests
npm run fmt # prettier
npm start # dev server with live reloadCredits & license
flatpickr was created by Gregory Petrosyan and its many contributors. flatpickr-ce keeps the original MIT license.
If flatpickr has made your life easier, you can buy its original author a coffee on Ko-fi.
