I have installed in my app the tempus_dominus
app, usuing in the following manner:
from tempus_dominus.widgets import DatePicker, TimePicker, DateTimePicker
class InformazioniGeneraliForm(forms.ModelForm):
data_registrazione=forms.DateTimeField(widget=DatePicker(attrs={
'append': 'fa fa-calendar',
'icon_toggle': True,
}))
And in my template utilized in the following manner:
{{ form.media }}
<div class="row">
<div class="form-group col-2 0 mb-0" >
{{form.codice_commessa|as_crispy_field}}
</div>
<div class="form-group col-2 0 mb-0" >
{{form.data_registrazione|as_crispy_field}}
</div>
All works great but now I have the necessity to insert a modal button in the same page. I have tried to insert the same {{form.data_registrazione|as_crispy_field}}
but when I press the datepicker it opens the first form one like in the following photo:
How could I solve this issue?