Skip to main content

django-bootstrap-daterangepicker

This is Django form field wrapper for bootstrap-daterangepicker, for use with Bootstrap 3 and 4.

This module allows for: single date pickers, date range selectors and datetime range selectors.

Ranges are returned as tuples of format (start, end), where start and end are datetime.date or datetime.datetime objects depending on the field type.

The DateField is a replacement for Django's built-in forms.DateField, with the only difference being that it accepts an optional clearable parameter, and the default widget is the DatePickerWidget specified in this module.

Installation

  1. pip install django-bootstrap-daterangepicker
  2. Add 'bootstrap_daterangepicker' to your INSTALLED_APPS
  3. Add the resource links required for bootstrap-daterangepicker into the <head> of the relevant HTML files

Example usage

from django import forms
from bootstrap_daterangepicker import widgets, fields


class DemoForm(forms.Form):
    # Date Picker Fields
    date_single_normal = fields.DateField()
    date_single_with_format = fields.DateField(
        input_formats=['%d/%m/%Y'],
        widget=widgets.DatePickerWidget(
            format='%d/%m/%Y'
        )
    )
    date_single_clearable = fields.DateField(required=False)

    # Date Range Fields
    date_range_normal = fields.DateRangeField()
    date_range_with_format = fields.DateRangeField(
        input_formats=['%d/%m/%Y'],
        widget=widgets.DateRangeWidget(
            format='%d/%m/%Y'
        )
    )
    date_range_clearable = fields.DateRangeField(required=False)

    # DateTime Range Fields
    datetime_range_normal = fields.DateTimeRangeField()
    datetime_range_with_format = fields.DateTimeRangeField(
        input_formats=['%d/%m/%Y (%I:%M:%S)'],
        widget=widgets.DateTimeRangeWidget(
            format='%d/%m/%Y (%I:%M:%S)'
        )
    )
    datetime_range_clearable = fields.DateTimeRangeField(required=False)

Requirements

Metadata

Release files for django-bootstrap-daterangepicker 1.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-bootstrap-daterangepicker 1.1.0
File Size Uploaded Provenance Actions
django-bootstrap-daterangepicker-1.1.0.tar.gz 6.9 kB Without provenance Details for django-bootstrap-daterangepicker-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-bootstrap-daterangepicker 1.1.0
File Interpreter ABI Platform Actions
django_bootstrap_daterangepicker-1.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for django_bootstrap_daterangepicker-1.1.0-py2.py3-none-any.whl

Total release size: 14.0 kB

Release files / django-bootstrap-daterangepicker-1.1.0.tar.gz

Download URL django-bootstrap-daterangepicker-1.1.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
63b3ce348476d1b11191762d6ad98e0014d545c69f40e8db15bbc7abc94269cf
BLAKE2b-256 checksum
How to use checksums
68b8c73a542dee1dc254f8177c67afcf3d734c787beb2a7882e962386f4b9480
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / django_bootstrap_daterangepicker-1.1.0-py2.py3-none-any.whl

Download URL django_bootstrap_daterangepicker-1.1.0-py2.py3-none-any.whl
Size 7.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b6a82eba823edeefdedc229475c40554dd907e0d0d6f8c762ae8145737a57168
BLAKE2b-256 checksum
How to use checksums
60a47e02293a40a71076c6a5b27227e9977e818d747409114609b8a1f96fdf43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for django-bootstrap-daterangepicker 1.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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