django-bootstrap3-datetimepicker icon indicating copy to clipboard operation
django-bootstrap3-datetimepicker copied to clipboard

Adjusting Glyphicons Position

Open bingorabbit opened this issue 11 years ago • 0 comments
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.

screenshot from 2014-03-24 11 48 29

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 = '''

bingorabbit avatar Mar 24 '14 10:03 bingorabbit