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.
Demo
- Custom Form.
- Model Form.
- Generic View (without Model Form).
- With django-crispy-forms.
- With django-filter.
- With dynamic formsets.
- In a Modal Window.
Getting Started
- Follow the Getting Started documentation.
- Pass llms.txt/llms-full.txt to your coding agent.
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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_flatpickr-2.1.0.tar.gz.
File metadata
- Download URL: django_flatpickr-2.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb3494502979b0d71e707563aeae5db766eed9fcd493614595ccdbdee471071
|
|
| MD5 |
cbe32d2678472bbcadad439bf0df2e5e
|
|
| BLAKE2b-256 |
d2669e028b8091144923c29296985ea6702fb51c886cab7c1e7af2e422bd8a8a
|
Provenance
The following attestation bundles were made for django_flatpickr-2.1.0.tar.gz:
Publisher:
deploy.yml on monim67/django-flatpickr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_flatpickr-2.1.0.tar.gz -
Subject digest:
3cb3494502979b0d71e707563aeae5db766eed9fcd493614595ccdbdee471071 - Sigstore transparency entry: 2734220038
- Sigstore integration time:
-
Permalink:
monim67/django-flatpickr@19ada32263229a5bc959416e37eb6e50e57b4a26 -
Branch / Tag:
refs/tags/2.1.0 - Owner: https://github.com/monim67
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@19ada32263229a5bc959416e37eb6e50e57b4a26 -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_flatpickr-2.1.0-py3-none-any.whl.
File metadata
- Download URL: django_flatpickr-2.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21396a389023bec598778ce13026095b598ce8154e2eaf11932d693c7163e38
|
|
| MD5 |
85d15af2942d2aefdbf0b52ed5ba9bae
|
|
| BLAKE2b-256 |
5e2e4c485bb3342c1641899f59c1e500f826e7b0dcfa4b06126fc78671ae2fb0
|
Provenance
The following attestation bundles were made for django_flatpickr-2.1.0-py3-none-any.whl:
Publisher:
deploy.yml on monim67/django-flatpickr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_flatpickr-2.1.0-py3-none-any.whl -
Subject digest:
b21396a389023bec598778ce13026095b598ce8154e2eaf11932d693c7163e38 - Sigstore transparency entry: 2734221204
- Sigstore integration time:
-
Permalink:
monim67/django-flatpickr@19ada32263229a5bc959416e37eb6e50e57b4a26 -
Branch / Tag:
refs/tags/2.1.0 - Owner: https://github.com/monim67
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@19ada32263229a5bc959416e37eb6e50e57b4a26 -
Trigger Event:
release
-
Statement type: