Skip to main content

Bootstrap 3 and 4 compatible Datepicker widget for Django.

Project description

This package is compatible with both Bootstrap 3 and 4, by giving the option to use a FontAwesome icon rather than a Glyphicon.

This package is intended to be used with bootstrap-datepicker and has been tested with v1.7.1.

This project was originally a fork of nkunihiko/django-bootstrap3-datetimepicker and hence similar to qoobic/django-bootstrap3-datepicker, but it now has the following breaking changes:

  • js/css files are no longer included in the project, managing them is up to the user, eg. using grablib.
  • the widget no longer has js/css assets. these are left for you to deploy as you wish.
  • bug/warning fixes
  • remove support for python 2.6 and associated clean up


  1. Run pip install django-bootstrap-datepicker-widget
  2. Add bootstrap_datepicker to your INSTALLED_APPS


from bootstrap_datepicker.widgets import DatePicker
from django import forms

  class ToDoForm(forms.Form):
      todo = forms.CharField(
          widget=forms.TextInput(attrs={"class": "form-control"}))
      date = forms.DateField(
          widget=DatePicker(options={"format": "YYYY-MM-DD"}, fontawesome=True))

The options will be passed to the JavaScript datetimepicker instance. Available options are explained in the bootstrap-datepicker docs

You don’t need to set the language option, because it will be set the current language of the thread automatically.


<!DOCTYPE html>
    <!-- load all required js/css yourself here -->
    <form method="post" role="form">
      {{ form|bootstrap }}
      {% csrf_token %}
      <div class="form-group">
        <input type="submit" value="Submit" class="btn btn-primary" />

Here we assume you’re using django-bootstrap-form or django-jinja-bootstrap-form but you can draw out your HTML manually.


  • Python >= 2.7
  • Django >= 1.8
  • Bootstrap >= 3
  • FontAwesome >= 1.0 if using Bootstrap 4+
  • Moment >= 2.10.6
  • bootstrap-datepicker >= 1.7.1

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-bootstrap-datepicker-widget, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django-bootstrap-datepicker-widget-0.1.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page