All Projects → monim67 → Django Bootstrap Datepicker Plus

monim67 / Django Bootstrap Datepicker Plus

Licence: apache-2.0
Bootstrap3/Bootstrap4 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django version 2.2, 2.1, 1.11, 1.10 and 1.8

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Bootstrap Datepicker Plus

django-flatpickr
Flatpicker based DatePickerInput, TimePickerInput and DateTimePickerInput with date-range-picker functionality for django >= 2.0
Stars: ✭ 41 (-73.72%)
Mutual labels:  timepicker, daterangepicker, date-picker, datetimepicker
vue3-date-time-picker
Datepicker component for Vue 3
Stars: ✭ 157 (+0.64%)
Mutual labels:  timepicker, daterangepicker, datetimepicker
Angular Datepicker
Highly configurable date picker built for Angular applications
Stars: ✭ 386 (+147.44%)
Mutual labels:  timepicker, date-picker
React Nice Dates
A responsive, touch-friendly, and modular date picker library for React.
Stars: ✭ 924 (+492.31%)
Mutual labels:  date-picker, daterangepicker
Datetimepicker
This is a custom android holo datepicker timepicker
Stars: ✭ 56 (-64.1%)
Mutual labels:  timepicker, datetimepicker
Pickerjs
⚠️ [Deprecated] No longer maintained. JavaScript date time picker.
Stars: ✭ 299 (+91.67%)
Mutual labels:  timepicker, datetimepicker
Datetimepicker
jQuery Plugin Date and Time Picker
Stars: ✭ 3,402 (+2080.77%)
Mutual labels:  timepicker, datetimepicker
Vue Mj Daterangepicker
🗓Vue.js date range picker with multiples ranges and presets (vue 2.x)
Stars: ✭ 48 (-69.23%)
Mutual labels:  date-picker, daterangepicker
popoPicker
popoPicker是一个移动端3D滚轮日期时间和单项的选择器,支持无限循环滚动,不依赖第三方库
Stars: ✭ 26 (-83.33%)
Mutual labels:  timepicker, datetimepicker
Angular Bootstrap Datetimepicker
Native Angular date/time picker component styled by Twitter Bootstrap
Stars: ✭ 1,289 (+726.28%)
Mutual labels:  timepicker, datetimepicker
Angular Mydatepicker
Angular datepicker and date range picker 📅
Stars: ✭ 76 (-51.28%)
Mutual labels:  date-picker, daterangepicker
Datetimepicker
📅 Date and Time Picker
Stars: ✭ 90 (-42.31%)
Mutual labels:  timepicker, datetimepicker
angular-eonasdan-datetimepicker
A wrapper directive around the Eonasdan Datepicker v4 component.
Stars: ✭ 63 (-59.62%)
Mutual labels:  date-picker, datetimepicker
skwas-cordova-plugin-datetimepicker
Cordova Plugin for showing a native date, time or datetime picker.
Stars: ✭ 37 (-76.28%)
Mutual labels:  timepicker, datetimepicker
Datetimepicker
⭐️🎉一个简约、漂亮的日期时间选择器,支持全方位自定义UI
Stars: ✭ 378 (+142.31%)
Mutual labels:  timepicker, datetimepicker
svelty-picker
Simple date & time picker in svelte
Stars: ✭ 38 (-75.64%)
Mutual labels:  timepicker, datetimepicker
Vue Datetime
Mobile friendly datetime picker for Vue. Supports date and datetime modes, i18n and more.
Stars: ✭ 928 (+494.87%)
Mutual labels:  timepicker, datetimepicker
Datepicker
仿滴滴出行预约打车IOS风格3D时间选择器 🌲
Stars: ✭ 118 (-24.36%)
Mutual labels:  datetimepicker, date-picker
yii2-datetime-widgets
Datetime widgets for Yii2
Stars: ✭ 22 (-85.9%)
Mutual labels:  daterangepicker, datetimepicker
s-date-range-picker
📅 A date range picker built with Svelte
Stars: ✭ 13 (-91.67%)
Mutual labels:  date-picker, datetimepicker

django-bootstrap-datepicker-plus

This django widget contains Bootstrap 3 and Bootstrap 4 Date-Picker, Time-Picker, DateTime-Picker, Month-Picker and Year-Picker input with date-range-picker functionality for django version 2.1, 2.0, 1.11, 1.10 and 1.8. The widget implements bootstrap-datetimepicker v4 <http://eonasdan.github.io/bootstrap-datetimepicker/>__ to show bootstrap-datepicker in django model forms and custom forms which can be configured easily for date-range selection.

| |ci-status| |docs-status| |coverage.io| |maintainability| |test-coverage| | |pyversions| |djversions| |pypi-version| | |format| |status| |license|

| |date-picker-image| |datetime-picker-image| |time-picker-image|

Demo

  • With Bootstrap 3 <https://monim67.github.io/django-bootstrap-datepicker-plus/>__.
  • With Bootstrap 4 <https://monim67.github.io/django-bootstrap-datepicker-plus/Bootstrap4.html>__.

Getting Started

Prerequisites ^^^^^^^^^^^^^

  • Python >= 3.3
  • Django >= 1.8
  • Bootstrap >= 3
  • jquery >= 1.7.1

Installing ^^^^^^^^^^ Install the PyPI package via pip

::

pip install django-bootstrap-datepicker-plus

Add bootstrap_datepicker_plus to the list of INSTALLED_APPS in your settings.py file.

.. code:: python

INSTALLED_APPS = [
    # Add the following
    'bootstrap_datepicker_plus',
]

This installation instruction assumes you have jQuery and Bootstrap JS/CSS files present in your template and you are using form.media in your django template. If not you have to configure your template.

Next ^^^^^^^^^^

  • Template configuration <https://monim67.github.io/django-bootstrap-datepicker-plus/configure/>__
  • Documentation on ReadTheDocs <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/>__
  • Quick Walkthrough Tutorial <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Walkthrough.html>__
  • I am having errors <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Troubleshooting.html>__

Usage

Usage in Generic View ^^^^^^^^^^^^^^^^^^^^^^

.. code:: python

# File: views.py
from bootstrap_datepicker_plus import DateTimePickerInput
from django.views import generic
from .models import Question

class CreateView(generic.edit.CreateView):
    model = Question
    fields = ['question_text', 'pub_date']
    def get_form(self):
        form = super().get_form()
        form.fields['pub_date'].widget = DateTimePickerInput()
        return form

Advanced Usage ^^^^^^^^^^^^^^^^^

  • Usage in Custom Form <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#custom-form-usage>__
  • Usage in Model Form <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#model-form-usage>__

Types of DatePickers ^^^^^^^^^^^^^^^^^^^^

The widget contains all types of date-picker you may ever need.

.. code:: python

# File: forms.py
from bootstrap_datepicker_plus import DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput
from django import forms

class EventForm(forms.ModelForm):
    class Meta:
        model = Event
        fields = ['start_date', 'start_time', 'start_datetime', 'start_month', 'start_year']
        widgets = {
            'start_date': DatePickerInput(),
            'start_time': TimePickerInput(),
            'start_datetime': DateTimePickerInput(),
            'start_month': MonthPickerInput(),
            'start_year': YearPickerInput(),
        }

Implement date-range-picker ^^^^^^^^^^^^^^^^^^^^^^^^^^^

DatePickers can be linked to select a date-range or time-range.

.. code:: python

# File: forms.py
from bootstrap_datepicker_plus import DatePickerInput, TimePickerInput
from django import forms

class EventForm(forms.ModelForm):
    class Meta:
        model = Event
        fields = ['name', 'start_date', 'end_date', 'start_time', 'end_time']
        widgets = {
            'start_date':DatePickerInput().start_of('event days'),
            'end_date':DatePickerInput().end_of('event days'),
            'start_time':TimePickerInput().start_of('party time'),
            'end_time':TimePickerInput().end_of('party time'),
        }

Customization ^^^^^^^^^^^^^^

  • Datepicker Options <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#customize-datepicker-options>__
  • Input field HTML template <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Template_Customizing.html>__
  • Language <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#customize-the-language>__

Contributing

  • CONTRIBUTING.md <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/.github/CONTRIBUTING.md>__.
  • CODE_OF_CONDUCT.md <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/.github/CODE_OF_CONDUCT.md>__.

License

This project is licensed under Apache License 2.0 - see the LICENSE <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/LICENSE>__ file for details.

Acknowledgments

This project implements Eonasdan/bootstrap-datetimepicker <https://github.com/Eonasdan/bootstrap-datetimepicker>__ to display date-pickers. The project was initially forked from pbucher/django-bootstrap-datepicker <https://github.com/pbucher/django-bootstrap-datepicker>__.

.. |date-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/date-picker.png :alt: Date-picker :width: 218px :height: 280px

.. |datetime-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/datetime-picker.png :alt: Datetime-picker :width: 218px :height: 280px

.. |time-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/time-picker.png :alt: Time-picker :width: 218px :height: 280px

.. |ci-status| image:: https://travis-ci.org/monim67/django-bootstrap-datepicker-plus.svg?branch=master :target: https://travis-ci.org/monim67/django-bootstrap-datepicker-plus :alt: Build Status :height: 20px

.. |docs-status| image:: https://readthedocs.org/projects/django-bootstrap-datepicker-plus/badge/?version=latest :target: https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status :height: 20px

.. |coverage.io| image:: https://coveralls.io/repos/github/monim67/django-bootstrap-datepicker-plus/badge.svg?branch=master :target: https://coveralls.io/github/monim67/django-bootstrap-datepicker-plus?branch=master :alt: Coverage Status :height: 20px

.. |maintainability| image:: https://api.codeclimate.com/v1/badges/d89033abcc5c8220f4cb/maintainability :target: https://codeclimate.com/github/monim67/django-bootstrap-datepicker-plus/maintainability :alt: Maintainability :height: 20px

.. |test-coverage| image:: https://api.codeclimate.com/v1/badges/d89033abcc5c8220f4cb/test_coverage :target: https://codeclimate.com/github/monim67/django-bootstrap-datepicker-plus/test_coverage :alt: Test Coverage :height: 20px

.. |pyversions| image:: https://img.shields.io/pypi/pyversions/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: Python Versions :height: 20px

.. |djversions| image:: https://img.shields.io/pypi/djversions/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: DJango Versions :height: 20px

.. |pypi-version| image:: https://badge.fury.io/py/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: PyPI version :height: 20px

.. |format| image:: https://img.shields.io/pypi/format/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: Format :height: 20px

.. |status| image:: https://img.shields.io/pypi/status/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: Status :height: 20px

.. |license| image:: https://img.shields.io/pypi/l/django-bootstrap-datepicker-plus.svg :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus :alt: Licence :height: 20px

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].