Forms:
class StartEndDateEpayOperatorsForm(forms.Form):
...
def __init__(self, *args, **kwargs):
super(StartEndDateEpayOperatorsForm, self).__init__(*args, **kwargs)
self.helper = FormHelper()
...
self.helper.layout = Layout(
AppendedText('start_date', '<span class="glyphicon glyphicon-calendar"></span>', active=True, css_class='date'),
...
)
HTML form:

...
<div class="input-group">
<input id="id_start_date" type="text" class="date dateinput form-control" value="2013-10-01" name="start_date">
<span class="input-group-addon active">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
...
To use the calendar icon as the bootstrap-datepicker startup , I need to add a new class date in<div class="input-group"> .
How can I achieve this with django-crispy shapes?
Currently, the AppendedText attribute css_class located on the INPUT element is not a parent DIV.
Tnx!
source
share