Skip to main content

django-flatpickr

This django widget contains Date-Picker, Time-Picker, DateTime-Picker input widgets with date-range-picker functionality for django version >= 2.0. The widget implements flatpickr to display date-pickers in django model forms and custom forms which can be configured easily for date-range selection. For Bootstrap date-picker see django-bootstrap-datepicker-plus.

Build Status Coverage Status Python Versions DJango Versions

Flatpickr Red Theme Flatpickr Default Theme Flatpickr Dark Theme

Demo

Getting Started

Usage

Usage in Custom Form

# File: forms.py
from django_flatpickr.widgets import DatePickerInput, TimePickerInput, DateTimePickerInput
from .models import Event
from django import forms

class ToDoForm(forms.Form):
    todo = forms.CharField(widget=forms.TextInput())
    date = forms.DateField(widget=DatePickerInput())
    time = forms.TimeField(widget=TimePickerInput())
    datetime = forms.DateTimeField(widget=DateTimePickerInput())

Implement date-range-picker

DatePickers can be linked together to select a date-range, time-range or date-time-range without writing a single line of JavaScript.

# File: forms.py
from django_flatpickr.widgets import DatePickerInput, TimePickerInput
from django import forms

class EventForm(forms.ModelForm):
    class Meta:
        model = Event
        fields = ["name", "start_date", "end_date", "start_time", "end_time"]
        widgets = {
            "start_date": DatePickerInput(),
            "end_date": DatePickerInput(range_from="start_date"),
            "start_time": TimePickerInput(),
            "end_time": TimePickerInput(range_from="start_time"),
        }
  • Read the full Usage doc for django-filter, django-crispy-forms, dynamic formsets and modal examples.

Customization

Contributing

License

This project is licensed under the MIT LICENSE.

Release files for django-flatpickr 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-flatpickr 2.1.0
File Size Uploaded
django_flatpickr-2.1.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-flatpickr 2.1.0
File Interpreter ABI Platform
django_flatpickr-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / django_flatpickr-2.1.0.tar.gz

Download URL django_flatpickr-2.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cb3494502979b0d71e707563aeae5db766eed9fcd493614595ccdbdee471071
BLAKE2b-256 checksum
How to use checksums
d2669e028b8091144923c29296985ea6702fb51c886cab7c1e7af2e422bd8a8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / django_flatpickr-2.1.0-py3-none-any.whl

Download URL django_flatpickr-2.1.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b21396a389023bec598778ce13026095b598ce8154e2eaf11932d693c7163e38
BLAKE2b-256 checksum
How to use checksums
5e2e4c485bb3342c1641899f59c1e500f826e7b0dcfa4b06126fc78671ae2fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page