django-bootstrap3-datetimepicker
django-bootstrap3-datetimepicker copied to clipboard
Adjusting Glyphicons Position
trafficstars
First, let me thank you for this awesome module.
I'd like to propose making the Calendar/Clock Glyphicons on the left instead of being on the right, so when ever an validation icons - usually shown on the right - appear, they don't interfere with the icon's position.
An image describing the final output is attached.

A patch that can be applied to this issue:
diff --git a/bootstrap3_datetime/widgets.py b/bootstrap3_datetime/widgets.py
index f006f80..f079b12 100644
--- a/bootstrap3_datetime/widgets.py
+++ b/bootstrap3_datetime/widgets.py
@@ -70,10 +70,10 @@ class DateTimePicker(DateTimeInput):
html_template = '''
<div%(div_attrs)s>
- <input%(input_attrs)s/>
<span class="input-group-addon">
<span%(icon_attrs)s></span>
</span>
+ <input%(input_attrs)s/>
</div>'''
js_template = '''