Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork62
Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
License
monim67/django-bootstrap-datepicker-plus
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This django widget contains Bootstrap 3, Bootstrap 4 and Bootstrap 5Date-Picker, Time-Picker, DateTime-Picker, Month-Picker and Year-Picker inputwith date-range-picker functionality for django version >= 2.0.The widget implementsbootstrap-datetimepicker v4to show bootstrap-datepicker in django model forms and custom formswhich can be configured easily for date-range selection.
If you are not using Bootstrap usedjango-flatpickr instead.
- Follow theGetting Started doc.
- Head over toUsage section to see how to use it in forms and views.
- Read detailedDocumentation on ReadTheDocs
- Looks complex to get started? Follow aQuick Walkthrough Tutorial
- Getting errors? SeeTroubleshoot instructions
# File: views.pyfrombootstrap_datepicker_plus.widgetsimportDateTimePickerInputfromdjango.viewsimportgenericfrom .modelsimportQuestionclassCreateView(generic.edit.CreateView):model=Questionfields= ["question_text","pub_date"]defget_form(self):form=super().get_form()form.fields["pub_date"].widget=DateTimePickerInput()returnform
The widget contains all types of date-picker you may ever need.
# File: forms.pyfrombootstrap_datepicker_plus.widgetsimportDatePickerInput,TimePickerInput,DateTimePickerInput,MonthPickerInput,YearPickerInputfromdjangoimportformsclassEventForm(forms.ModelForm):classMeta:model=Eventfields= ["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(), }
DatePickers can be linked to select a date-range or time-range.
# File: forms.pyfrombootstrap_datepicker_plus.widgetsimportDatePickerInput,TimePickerInputfromdjangoimportformsclassEventForm(forms.ModelForm):classMeta:model=Eventfields= ["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"), }
This project is licensed underMIT LICENSE file for details.
This project implementsEonasdan/bootstrap-datetimepicker to display date-pickers.The project was initially forked frompbucher/django-bootstrap-datepicker andlater reworked completely under MIT Licence.
About
Bootstrap3/Bootstrap4/Bootstrap5 DatePickerInput, TimePickerInput, DateTimePickerInput, MonthPickerInput, YearPickerInput with date-range-picker functionality for django >= 2.0
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.



