Skip to content

Commit addb755

Browse files
committed
Updated to use Bootstrap v3 datetimepicker widget V2
1 parent bf90366 commit addb755

File tree

69 files changed

+5696
-1491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+5696
-1491
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,8 @@ nosetests.xml
3636
.DS_Store
3737
.settings/
3838
__pycache__/
39+
40+
# Intellij
41+
.idea/
42+
*.iml
43+
*.iws

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
django-bootstrap3-datetimepicker
22
================================
33

4-
This package uses bootstrap-datetimepicker.js provided by the following project:
4+
This package uses Bootstrap v3 datetimepicker widget version 2 provided by the following project:
55
https://github.com/Eonasdan/bootstrap-datetimepicker
66

7+
The correct formatting options for dates can be found here:
8+
http://momentjs.com/docs/
9+
710
It works only with Bootstrap3. If you are using Bootstrap2 in your Django project,
811
visit https://github.com/zokis/django-bootstrap-datetimepicker
912

@@ -22,22 +25,21 @@ Example
2225
from bootstrap3_datetime.widgets import DateTimePicker
2326
from django import forms
2427

25-
class ToDoForm(forms.Form):
26-
todo = forms.CharField(
27-
widget=forms.TextInput(attrs={"class": "form-control"}))
28-
date = forms.DateField(
29-
widget=DateTimePicker(options={"format": "yyyy-MM-dd",
30-
"pickTime": False}))
31-
reminder = forms.DateTimeField(
32-
required=False,
33-
widget=DateTimePicker(options={"format": "yyyy-MM-dd hh:mm",
34-
"pickSeconds": False}))
28+
class ToDoForm(forms.Form):
29+
todo = forms.CharField(
30+
widget=forms.TextInput(attrs={"class": "form-control"}))
31+
date = forms.DateField(
32+
widget=DateTimePicker(options={"format": "YYYY-MM-DD",
33+
"pickTime": False}))
34+
reminder = forms.DateTimeField(
35+
required=False,
36+
widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
37+
"pickSeconds": False}))
3538

3639
The `options` will be passed to the JavaScript datetimepicker instance.
3740
Available `options` are explained in the following documents:
3841

39-
* http://tarruda.github.io/bootstrap-datetimepicker/
40-
* http://www.eyecon.ro/bootstrap-datepicker/
42+
* http://eonasdan.github.io/bootstrap-datetimepicker/
4143

4244
You don't need to set the `language` option,
4345
because it will be set the current language of the thread automatically.

README.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
django-bootstrap3-datetimepicker
22
================================
33

4-
This package uses bootstrap-datetimepicker.js provided by the following project:
4+
This package uses Bootstrap v3 datetimepicker widget version 2 provided by the following project:
55
https://github.com/Eonasdan/bootstrap-datetimepicker
66

7+
The correct formatting options for dates can be found here:
8+
http://momentjs.com/docs/
9+
710
It works only with Bootstrap3. If you are using Bootstrap2 in your
811
Django project, check out this:
912
https://github.com/zokis/django-bootstrap-datetimepicker
@@ -29,19 +32,18 @@ forms.py
2932
todo = forms.CharField(
3033
widget=forms.TextInput(attrs={"class": "form-control"}))
3134
date = forms.DateField(
32-
widget=DateTimePicker(options={"format": "yyyy-MM-dd",
35+
widget=DateTimePicker(options={"format": "YYYY-MM-DD",
3336
"pickTime": False}))
3437
reminder = forms.DateTimeField(
3538
required=False,
36-
widget=DateTimePicker(options={"format": "yyyy-MM-dd hh:mm",
39+
widget=DateTimePicker(options={"format": "YYYY-MM-DD HH:mm",
3740
"pickSeconds": False}))
3841

3942
The ``options`` will be passed to the JavaScript datetimepicker
4043
instance. Available ``options`` are explained in the following
4144
documents:
4245

43-
- http://tarruda.github.io/bootstrap-datetimepicker/
44-
- http://www.eyecon.ro/bootstrap-datepicker/
46+
- http://eonasdan.github.io/bootstrap-datetimepicker/
4547

4648
You don't need to set the ``language`` option, because it will be set
4749
the current language of the thread automatically.

bootstrap3_datetime/static/bootstrap3_datetime/css/bootstrap-datetimepicker.min.css

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)