flatpickr /flatpickr

lightweight, powerful javascript datetimepicker with no dependencies

★ 16,448⑂ 1,453👁 188⑃ 712● 2,236▤ 137
TypeScriptMITCreated 2015-08-10flatpickr.js.org
下载:v4.6.13v4.6.13 ↓4.6.132022-04-14
-1
日增长
16,448
stars
1,453
forks
188
watchers
712
prs
2,236
issues
137
releases

README

flatpickr - javascript datetime picker








!blue
!green
!confetti
!red
!default
!dark


 Motivation
Almost every large SPA or project involves date and time input. Browser's native implementations of those are inconsistent and limited in functionality. Most other libraries require you to pull in heavy dependencies like jQuery, Bootstrap, and moment.js. I wanted something that was good-looking out of the box, dependency-free, powerful, and extensible.

Feature overview:

- 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
- 51 locales
- 8 colorful themes (incl. dark and material)
- Numerous plugins
- Libraries available for React, Angular, Vue, Ember, and more

!

flatpickr provides more functionality at a fraction of the size of other libraries.

 Compatibility
IE9 and up, Edge, iOS Safari 6+, Chrome 8+, Firefox 6+

 Install & Use

Demos and documentation: https://flatpickr.js.org

See also:
 angular2+-flatpickr addon
 angularJS-flatpickr addon
 ember-flatpickr addon
 Preact Component
 React Component
 Stimulus.js Controller
 Svelte Component
 vue-flatpickr component
 lit-flatpickr component

 Supporting flatpickr

flatpickr will never change its license, pester users for donations, or engage in other user-hostile behavior.

Nevertheless, if you enjoyed working with this library or if its made your life easier, you can buy me a cup of coffee :)

Top issues

Discussions

Latest release

v4.6.13 v4.6.13 2022-04-14
What's Changed
 Fix change events not firing from the month select plugin
 Fix week numbers being calculated incorrectly in some cases
 Fix erroneous change events firing in edge cases (2668 )
 Run Prettier check in the CI to reject unformatted code by @mshibuya in https://github.com/flatpickr/flatpickr/pull/2663
 translated more strings into albanian by @dianfishekqi in https://github.com/flatpickr/flatpickr/pull/2674
 fixes 2669 monthSelectPlugin doesnt highlight correct month, when data is loaded by @koesper in https://github.com/flatpickr/flatpickr/pull/2676

 New Contributors
 @d

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON