Skip to content

Commit

Permalink
🐛 [BUG] Fix datepicker display (refs #3825)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chatewgne committed Jan 2, 2024
1 parent 79e00b0 commit c32973a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
11 changes: 9 additions & 2 deletions geotrek/maintenance/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,15 @@ class InterventionForm(CommonForm):

topology = TopologyField(label="")
length = FloatField(required=False, label=_("Length"))
project = forms.ModelChoiceField(required=False, label=_("Project"),
queryset=Project.objects.existing())
project = forms.ModelChoiceField(
required=False, label=_("Project"),
queryset=Project.objects.existing()
)
end_date = forms.DateField(
required=False,
widget=forms.DateInput(attrs={"data-date-orientation": "bottom auto"}),
)


geomfields = ['topology']
leftpanel_scrollable = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
{{ block.super }}
<script type="text/javascript">
$(window).ready(function () {
$('#id_date').datepicker({
autoclose: true,
language: '{{ request.LANGUAGE_CODE }}',
format: window.SETTINGS.date_format
});

// TODO: do this with crispyforms !
$("fieldset.formset").detach().appendTo('#mainform fieldset');

Expand Down

0 comments on commit c32973a

Please sign in to comment.