Skip to main content

A Django widget for the Tempus Dominus Bootstrap 4 DateTime picker.

Project description

Django Tempus Dominus

Django Tempus Dominus provides Django widgets for the Tempus Dominus Bootstrap 4 DateTime date and time picker. Why yet another date and time picker for Django? None supported the Tempus Dominus date and time picker, which is actively developed and feature rich. It is a successor to the popular bootstrap-datetimepicker JavaScript library.


  • From PyPI: pip install django-tempus-dominus

  • From source:

git clone git+
pip install -e django-tempus-dominus


Three widgets are provided:

  • DatePicker, which defaults to YYYY-MM-DD
  • DateTimePicker, which defaults to YYYY-MM-DD HH:mm:ss
  • TimePicker, which defaults to HH:mm:ss

In your Django form, you can use the widgets like this:

import datetime

from django import forms
from tempus_dominus.widgets import DatePicker, TimePicker, DateTimePicker

class MyForm(forms.Form):
    date_field = forms.DateField(
                'minDate': '2009-01-20',
                'maxDate': '2017-01-20',
    time_field = forms.TimeField(
                'enabledHours': [9, 10, 11, 12, 13, 14, 15, 16],
    datetime_field = forms.DateTimeField(
                'minDate': ( + datetime.timedelta(days=1)).strftime('%Y-%m-%d'),  # Tomorrow
                'useCurrent': True,
                'collapse': False,

The options dictionary will be passed to Tempus Dominus. A full list of options is available here.

Then in your template, include jQuery, {{ }}, and render the form:

        <script crossorigin="anonymous" integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f" src=""></script>
        {{ }}
    <form method="post" action=".">
        {% csrf_token %}
        {{ form.as_p }}

Change Log

  • Upgrade to Tempus Dominus full release version 5.0.1. Fix bug for populating initial values (thank you, @ianastewart).
  • 0.1.2: UX enhancement: auto-dismiss dialog if the input loses focus.
  • 0.1.1: Bug fixes.
  • 0.1.0: Initial release.


Contributors (Thank You!)

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
django_tempus_dominus- (4.4 kB) Copy SHA256 hash SHA256 Wheel py3 Aug 13, 2018
django-tempus-dominus- (4.1 kB) Copy SHA256 hash SHA256 Source None Aug 13, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page