Skip to main content

Bootstrap3 compatible datetimepicker for Django2/dPAC project.

Project description

This package uses Bootstrap v3 datetimepicker widget version 2 provided by the following project:
The correct formatting options for dates can be found here:

It works only with Bootstrap3. If you are using Bootstrap2 in your Django project, check out this:


  • Run pip install django-bootstrap3-datetimepicker
  • Add 'bootstrap3_datetime' to your INSTALLED_APPS


from bootstrap3_datetime.widgets import DateTimePicker
from django import forms

class ToDoForm(forms.Form):
    todo = forms.CharField(
        widget=forms.TextInput(attrs={"class": "form-control"}))
    date = forms.DateField(
        widget=DateTimePicker(options={"format": "YYYY-MM-DD",
                                       "pickTime": False}))
    reminder = forms.DateTimeField(
        widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
                                       "pickSeconds": False}))

The options will be passed to the JavaScript datetimepicker instance. Available options are explained in the following documents:

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


<!DOCTYPE html>
        <link rel="stylesheet"
        <link rel="stylesheet"
        <script src="//">
        <script src="//">
        {{ }}
        <form method="post" role="form">
            {% for field in form.visible_fields %}
            <div id="div_{{ field.html_name }}"
                 class="form-group{% if field.errors %} has-error{% endif %}">
                {{ field.label_tag }}
                {{ field }}
                <div class="text-muted pull-right">
                    <small>{{ field.help_text }}</small>
                <div class="help-block">
                    {{ field.errors }}
            {% endfor %}
            {% for hidden in form.hidden_fields %}
                {{ hidden }}
            {% endfor %}
            {% csrf_token %}
            <div class="form-group">
                <input type="submit" value="Submit" class="btn btn-primary" />

Bootstrap3 and jQuery have to be included along with {{ }}

Release Notes


  • Updated bootstrap-datetimepicker.js to version 3.0


  • Updated bootstrap-datetimepicker.js to version 2.1.30


  • Updated bootstrap-datetimepicker.js to version 2.1.30


  • Includes bootstrap-datetimepicker.js version 2.1.11 with moment.js
  • The format strings have changed due to using moment.js


  • Python >= 2.4
  • Django >= 1.3
  • Bootstrap >= 3.0

Project details

Download files

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

Files for dpac-datetimepicker, version 3.1.1
Filename, size File type Python version Upload date Hashes
Filename, size dpac_datetimepicker-3.1.1-py2.7.egg (120.7 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size dpac_datetimepicker-3.1.1-py3.6.egg (120.8 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size dpac_datetimepicker-3.1.1-py3.7.egg (120.6 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size dpac-datetimepicker-3.1.1.tar.gz (74.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page