Documentation v1.1.0

Preview Purchase


Lean, UX-driven, and extensible, yet it doesn’t depend on any libraries. There’s minimal UI but many themes. Rich, exposed APIs and event system make it suitable for any environment. For full documentation please check the plugin's site.


Flatpickr's CSS and Javascript files are bundled in the global plugin bundles and globally included in all pages:
<link href="assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css"/>
<script src="assets/plugins/global/plugins.bundle.js"></script>


  • Flatpickr's CSS is highly customized in sass/vendors/plugins/_flatpickr.scssSCSS file in order to use it as native component within the design system. The SCSS code is compiled into assets/plugins/global/plugins.bundle.cssand globally included in all pages.
  • Flatpickr's Javascript is globally initialized with some predefined settings in src/js/vendors/plugins/flatpickr.init.jsand the initialization code is bundled within assets/plugins/global/plugins.bundle.jsand globally included in all pages.
  • To start usin Flatpckr right away, check the official Getting Started guide.

Basic Examples

Basic examples of Flatpickr on default and solid background input styles:

<div class="mb-10">
    <label for="" class="form-label">Default input style</label>
    <input class="form-control" placeholder="Pick a date" id="kt_datepicker_1"/>
<div class="mb-0">
    <label for="" class="form-label">Solid background style</label>
    <input class="form-control form-control-solid" placeholder="Pick a date" id="kt_datepicker_2"/>


Specify datetime format through dateFormatparameter to enable date and time selection.
    enableTime: true,
    dateFormat: "Y-m-d H:i",
<div class="mb-0">
    <label for="" class="form-label">Select date and time</label>
    <input class="form-control form-control-solid" placeholder="Pick date & time" id="kt_datepicker_3"/>

Disabling Dates

Use disableoption to make certain dates or range of dates unavailable for selection:
    onReady: function () {
    disable: ["2025-01-10", "22025-01-11", "2025-01-12", "2025-01-13", "2025-01-14", "2025-01-15", "2025-01-16", "2025-01-17"],
    dateFormat: "Y-m-d",

    onReady: function () {
    dateFormat: "Y-m-d",
    disable: [
            from: "2025-01-05",
            to: "2025-01-25"
            from: "2025-02-03",
            to: "2025-02-15"

Selecting Multiple Dates

It is possible to select multiple dates at once:
    onReady: function () {
    mode: "multiple",
    dateFormat: "Y-m-d",
    defaultDate: ["2025-01-05", "2025-01-10"]

Range Selections

Select a range of dates using the range calendar. Note that disabled dates (by either minDate, maxDate, enable or disable) will not be allowed in selections.
    altInput: true,
    altFormat: "F j, Y",
    dateFormat: "Y-m-d",
    mode: "range"

Time Picker

Hide date picker and allow only time picker:
    enableTime: true,
    noCalendar: true,
    dateFormat: "H:i",

Week Numbers

Enable the weekNumbers option to display the week number in a column left to the calendar.
    weekNumbers: true

Modal Example

Use Flatpickr within Bootstrap Modal:
<div class="modal fade" tabindex="-1" id="kt_modal_1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Modal title</h5>
                <div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
                    <span class="svg-icon svg-icon-2x"></span>

            <div class="modal-body">
                <div class="mb-0">
                    <label for="" class="form-label">Select date</label>
                    <input class="form-control form-control-solid" placeholder="Pick date" id="kt_datepicker_10"/>

            <div class="modal-footer">
                <button type="button" class="btn btn-light" data-bs-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
Learn & Get Inspired

Support at

Join our developers community to find answer to your question and help others. FAQs
Get Support
From guides and how-tos, to live demos and code examples to get started right away.
Plugins & Components
Check out our 300+ in-house components and customized 3rd-party plugins.
Layout Builder
Build your layout, preview it and export the HTML for server side integration.
What's New
Latest features and improvements added with our users feedback in mind.
Buy now