# django-bootstrap3-datetimepicker **Repository Path**: mirrors_inducer/django-bootstrap3-datetimepicker ## Basic Information - **Project Name**: django-bootstrap3-datetimepicker - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-25 - **Last Updated**: 2026-11-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README django-bootstrap3-datetimepicker ================================ This package uses Bootstrap v3 datetimepicker widget version 2 provided by the following project: https://github.com/Eonasdan/bootstrap-datetimepicker The correct formatting options for dates can be found here: http://momentjs.com/docs/ It works only with Bootstrap3. If you are using Bootstrap2 in your Django project, visit https://github.com/zokis/django-bootstrap-datetimepicker Install ------------------------------- * Run `pip install django-bootstrap3-datetimepicker` * Add `'bootstrap3_datetime'` to your `INSTALLED_APPS` Example -------------------------------- ###### forms.py 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( required=False, 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: * http://eonasdan.github.io/bootstrap-datetimepicker/ You don't need to set the `language` option, because it will be set the current language of the thread automatically. ###### template.html {{ form.media }}
{% for field in form.visible_fields %}
{{ field.label_tag }} {{ field }}
{{ field.help_text }}
{{ field.errors }}
{% endfor %} {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} {% csrf_token %}
Bootstrap3 and jQuery have to be included along with `{{ form.media }}` Release Notes ------------------------------- ###### v2.3 * Updated bootstrap-datetimepicker.js to version 3.0 ###### v2.2.3 * Updated bootstrap-datetimepicker.js to version 2.1.30 ###### v2.0.0 * Includes bootstrap-datetimepicker.js version 2.1.11 with moment.js * The format strings have changed due to using moment.js Requirements ------------------------------- * Python >= 2.4 * Django >= 1.3 * Bootstrap >= 3.0