########################################
django-bootstrap-datepicker-plus
########################################
This django widget contains Bootstrap 3, Bootstrap 4 and Bootstrap 5
Date-Picker, Time-Picker, DateTime-Picker, Month-Picker and Year-Picker input
with date-range-picker functionality for django version >= 2.0.
The widget implements `bootstrap-datetimepicker v4 <https://getdatepicker.com/4/>`_
to show bootstrap-datepicker in django model forms and custom forms
which can be configured easily for date-range selection.
If you are not using Bootstrap use `django-flatpickr <https://github.com/monim67/django-flatpickr>`_ instead.
| |build-status| |docs-status| |coverage|
| |pyversions| |djversions| |license|
| |date-picker-image| |datetime-picker-image| |time-picker-image|
********************
Demo
********************
- `With Bootstrap 3 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap3/>`_
- `With Bootstrap 4 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap4/>`_
- `With Bootstrap 5 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap5/>`_
********************
Getting Started
********************
- Follow the `Getting Started doc <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Getting_Started.html>`_.
- Head over to `Usage <#usage>`_ section to see how to use it in forms and views.
- Read detailed `Documentation on ReadTheDocs <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/>`_
- Looks complex to get started? Follow a `Quick Walkthrough Tutorial <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Walkthrough.html>`_
- Getting errors? See `Troubleshoot instructions <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.widgets 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>`_
- `Usage doc <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html>`_
++++++++++++++++++++++++++++++
Types of DatePickers
++++++++++++++++++++++++++++++
The widget contains all types of date-picker you may ever need.
.. code:: python
# File: forms.py
from bootstrap_datepicker_plus.widgets 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.widgets 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(),
"end_date": DatePickerInput(range_from="start_date"),
"start_time": TimePickerInput(),
"end_time": TimePickerInput(range_from="start_time"),
}
++++++++++++++++++++++++++++++
Customization
++++++++++++++++++++++++++++++
- `Customize date format, language <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/customization.html>`_
- `Use custom template for widget input <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Template_Customizing.html>`_
********************
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 `MIT 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>`_ and
later reworked completely under MIT Licence.
|buymeacoffee|
.. |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
.. |build-status| image:: https://github.com/monim67/django-bootstrap-datepicker-plus/actions/workflows/build.yml/badge.svg?event=push
:target: https://github.com/monim67/django-bootstrap-datepicker-plus/actions/workflows/build.yml
: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| 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
.. |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
.. |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
.. |buymeacoffee| image:: https://cdn.buymeacoffee.com/buttons/v2/default-orange.png
:target: https://www.buymeacoffee.com/monim67
:alt: Buy Me A Coffee
:height: 48px
Raw data
{
"_id": null,
"home_page": "https://github.com/monim67/django-bootstrap-datepicker-plus",
"name": "django-bootstrap-datepicker-plus",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "django,bootstrap,date-picker,time-picker,datetime-picker,date-range-picker",
"author": "Abdul Monim",
"author_email": "6266677+monim67@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/95/f2/64abdea909b73daa386e0c631f023efd899e1b64e19bbc329a2ab2455d64/django_bootstrap_datepicker_plus-5.0.5.tar.gz",
"platform": null,
"description": "########################################\ndjango-bootstrap-datepicker-plus\n########################################\n\nThis django widget contains Bootstrap 3, Bootstrap 4 and Bootstrap 5\nDate-Picker, Time-Picker, DateTime-Picker, Month-Picker and Year-Picker input\nwith date-range-picker functionality for django version >= 2.0.\nThe widget implements `bootstrap-datetimepicker v4 <https://getdatepicker.com/4/>`_\nto show bootstrap-datepicker in django model forms and custom forms\nwhich can be configured easily for date-range selection.\n\nIf you are not using Bootstrap use `django-flatpickr <https://github.com/monim67/django-flatpickr>`_ instead.\n\n| |build-status| |docs-status| |coverage|\n| |pyversions| |djversions| |license|\n\n| |date-picker-image| |datetime-picker-image| |time-picker-image|\n\n\n\n********************\nDemo\n********************\n\n- `With Bootstrap 3 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap3/>`_\n- `With Bootstrap 4 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap4/>`_\n- `With Bootstrap 5 <https://monim67.github.io/django-bootstrap-datepicker-plus/demo/bootstrap5/>`_\n\n\n\n********************\nGetting Started\n********************\n\n- Follow the `Getting Started doc <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Getting_Started.html>`_.\n- Head over to `Usage <#usage>`_ section to see how to use it in forms and views.\n- Read detailed `Documentation on ReadTheDocs <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/>`_\n- Looks complex to get started? Follow a `Quick Walkthrough Tutorial <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Walkthrough.html>`_\n- Getting errors? See `Troubleshoot instructions <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Troubleshooting.html>`_\n\n\n\n********************\nUsage\n********************\n\n\n++++++++++++++++++++++++++++++\nUsage in Generic View\n++++++++++++++++++++++++++++++\n\n.. code:: python\n\n # File: views.py\n from bootstrap_datepicker_plus.widgets import DateTimePickerInput\n from django.views import generic\n from .models import Question\n\n class CreateView(generic.edit.CreateView):\n model = Question\n fields = [\"question_text\", \"pub_date\"]\n def get_form(self):\n form = super().get_form()\n form.fields[\"pub_date\"].widget = DateTimePickerInput()\n return form\n\n\n++++++++++++++++++++++++++++++\nAdvanced Usage\n++++++++++++++++++++++++++++++\n\n- `Usage in Custom Form <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#custom-form-usage>`_\n- `Usage in Model Form <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html#model-form-usage>`_\n- `Usage doc <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Usage.html>`_\n\n\n++++++++++++++++++++++++++++++\nTypes of DatePickers\n++++++++++++++++++++++++++++++\n\nThe widget contains all types of date-picker you may ever need.\n\n.. code:: python\n\n # File: forms.py\n from bootstrap_datepicker_plus.widgets import DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput\n from django import forms\n\n class EventForm(forms.ModelForm):\n class Meta:\n model = Event\n fields = [\"start_date\", \"start_time\", \"start_datetime\", \"start_month\", \"start_year\"]\n widgets = {\n \"start_date\": DatePickerInput(),\n \"start_time\": TimePickerInput(),\n \"start_datetime\": DateTimePickerInput(),\n \"start_month\": MonthPickerInput(),\n \"start_year\": YearPickerInput(),\n }\n\n\n++++++++++++++++++++++++++++++\nImplement date-range-picker\n++++++++++++++++++++++++++++++\n\nDatePickers can be linked to select a date-range or time-range.\n\n.. code:: python\n\n # File: forms.py\n from bootstrap_datepicker_plus.widgets import DatePickerInput, TimePickerInput\n from django import forms\n\n class EventForm(forms.ModelForm):\n class Meta:\n model = Event\n fields = [\"name\", \"start_date\", \"end_date\", \"start_time\", \"end_time\"]\n widgets = {\n \"start_date\": DatePickerInput(),\n \"end_date\": DatePickerInput(range_from=\"start_date\"),\n \"start_time\": TimePickerInput(),\n \"end_time\": TimePickerInput(range_from=\"start_time\"),\n }\n\n\n++++++++++++++++++++++++++++++\nCustomization\n++++++++++++++++++++++++++++++\n\n- `Customize date format, language <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/customization.html>`_\n- `Use custom template for widget input <https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/Template_Customizing.html>`_\n\n\n********************\nContributing\n********************\n\n- `CONTRIBUTING.md <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/.github/CONTRIBUTING.md>`_.\n- `CODE_OF_CONDUCT.md <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/.github/CODE_OF_CONDUCT.md>`_.\n\n********************\nLicense\n********************\n\nThis project is licensed under `MIT LICENSE <https://github.com/monim67/django-bootstrap-datepicker-plus/blob/master/LICENSE>`_ file for details.\n\n********************\nAcknowledgments\n********************\n\nThis project implements `Eonasdan/bootstrap-datetimepicker <https://github.com/Eonasdan/bootstrap-datetimepicker>`_ to display date-pickers.\nThe project was initially forked from `pbucher/django-bootstrap-datepicker <https://github.com/pbucher/django-bootstrap-datepicker>`_ and\nlater reworked completely under MIT Licence.\n\n\n|buymeacoffee|\n\n\n.. |date-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/date-picker.png\n :alt: Date-picker\n :width: 218px\n :height: 280px\n\n.. |datetime-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/datetime-picker.png\n :alt: Datetime-picker\n :width: 218px\n :height: 280px\n\n.. |time-picker-image| image:: https://raw.githubusercontent.com/monim67/django-bootstrap-datepicker-plus/26d89a744d403a895422313a48c02885c4718251/images/time-picker.png\n :alt: Time-picker\n :width: 218px\n :height: 280px\n\n.. |build-status| image:: https://github.com/monim67/django-bootstrap-datepicker-plus/actions/workflows/build.yml/badge.svg?event=push\n :target: https://github.com/monim67/django-bootstrap-datepicker-plus/actions/workflows/build.yml\n :alt: Build Status\n :height: 20px\n\n.. |docs-status| image:: https://readthedocs.org/projects/django-bootstrap-datepicker-plus/badge/?version=latest\n :target: https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n :height: 20px\n\n.. |coverage| image:: https://coveralls.io/repos/github/monim67/django-bootstrap-datepicker-plus/badge.svg?branch=master\n :target: https://coveralls.io/github/monim67/django-bootstrap-datepicker-plus?branch=master\n :alt: Coverage Status\n :height: 20px\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/django-bootstrap-datepicker-plus.svg\n :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus\n :alt: Python Versions\n :height: 20px\n\n.. |djversions| image:: https://img.shields.io/pypi/djversions/django-bootstrap-datepicker-plus.svg\n :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus\n :alt: DJango Versions\n :height: 20px\n\n.. |license| image:: https://img.shields.io/pypi/l/django-bootstrap-datepicker-plus.svg\n :target: https://pypi.python.org/pypi/django-bootstrap-datepicker-plus\n :alt: Licence\n :height: 20px\n\n.. |buymeacoffee| image:: https://cdn.buymeacoffee.com/buttons/v2/default-orange.png\n :target: https://www.buymeacoffee.com/monim67\n :alt: Buy Me A Coffee\n :height: 48px\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput",
"version": "5.0.5",
"project_urls": {
"Documentation": "https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/",
"Homepage": "https://github.com/monim67/django-bootstrap-datepicker-plus",
"Repository": "https://github.com/monim67/django-bootstrap-datepicker-plus"
},
"split_keywords": [
"django",
"bootstrap",
"date-picker",
"time-picker",
"datetime-picker",
"date-range-picker"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "554627def8da80a9600194aeb90f8f609591e965c9fb82bfe64bdc832f8ddfe5",
"md5": "dbec908f8ba7abf1f93e29c65708180f",
"sha256": "f0818dcaca6824f2bc3b42b53e2cd0e42e9ceb2c8802254f9d38d4cce04b31d8"
},
"downloads": -1,
"filename": "django_bootstrap_datepicker_plus-5.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dbec908f8ba7abf1f93e29c65708180f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 13287,
"upload_time": "2023-12-09T15:37:18",
"upload_time_iso_8601": "2023-12-09T15:37:18.507637Z",
"url": "https://files.pythonhosted.org/packages/55/46/27def8da80a9600194aeb90f8f609591e965c9fb82bfe64bdc832f8ddfe5/django_bootstrap_datepicker_plus-5.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "95f264abdea909b73daa386e0c631f023efd899e1b64e19bbc329a2ab2455d64",
"md5": "e6dd5965491ad4c50d3e4690b8842674",
"sha256": "ea5e2bc2137a72b57ba10d2a5f18373049b0d252052f921e5a76c260eaaa35ee"
},
"downloads": -1,
"filename": "django_bootstrap_datepicker_plus-5.0.5.tar.gz",
"has_sig": false,
"md5_digest": "e6dd5965491ad4c50d3e4690b8842674",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 12857,
"upload_time": "2023-12-09T15:37:20",
"upload_time_iso_8601": "2023-12-09T15:37:20.445041Z",
"url": "https://files.pythonhosted.org/packages/95/f2/64abdea909b73daa386e0c631f023efd899e1b64e19bbc329a2ab2455d64/django_bootstrap_datepicker_plus-5.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-09 15:37:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "monim67",
"github_project": "django-bootstrap-datepicker-plus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-bootstrap-datepicker-plus"
}