# django2-bootstrap3-datetimepicker **Repository Path**: mirrors_elapouya/django2-bootstrap3-datetimepicker ## Basic Information - **Project Name**: django2-bootstrap3-datetimepicker - **Description**: bootstrap3-datepicker for django - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README django2-bootstrap3-datetimepicker ================================= This project was originally a fork of https://github.com/tutorcruncher/django-bootstrap3-datetimepicker : The js/css files are now included again into the project 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. Install ------- - Run ``pip install django2-bootstrap3-datetimepicker`` - Add ``'bootstrap3_datetime'`` to your ``INSTALLED_APPS`` Example ------- forms.py ^^^^^^^^ .. code:: python 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"})) reminder = forms.DateTimeField( required=False, widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm"})) 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 ^^^^^^^^^^^^^ .. code:: html
{{ form.media }} Bootstrap3 and jQuery have to be included along with ``{{ form.media }}`` Requirements ------------ - Python >= 3.4 - Django >= 2.0 - Bootstrap == 3.X - Moment >= 2.10.6 - bootstrap-datetimepicker >= 4.15.35