diff --git a/templates/variants/toodego/qommon/forms/widgets/caluire-reservations-enfant.html b/templates/variants/toodego/qommon/forms/widgets/caluire-reservations-enfant.html
index cd8dedd9..5ca5dbaa 100644
--- a/templates/variants/toodego/qommon/forms/widgets/caluire-reservations-enfant.html
+++ b/templates/variants/toodego/qommon/forms/widgets/caluire-reservations-enfant.html
@@ -4,15 +4,17 @@
{% with options=widget.get_options|list %}
{% with first_monday=options.0.options.details.JOURDATE|adjust_to_week_monday last_option=options|last %}
{% with last_day=last_option.options.details.JOURDATE|adjust_to_week_monday|add_days:6 %}
+{% now 'Y-m-d' as now %}
+{% spaceless %}
{% for day in first_monday|iterate_days_until:last_day %}
{% if day.weekday == 0 %}
{% if not forloop.first %}
{% endif %}
-Semaine
du {{day|date:"d/m"}} au {{day|add_days:6|date:"d/m"}}
+- Semaine
du {{day|date:"d/m"}} au {{day|add_days:6|date:"d/m"}}
{% endif %}
-- {{day|date:"l d/m"}}
+- {{day|date:"l d/m"}}
{% with day_str=day|date:"Y-m-d" %}
{% for option in options %}
{% if option.options.details.JOURDATE == day_str %}
@@ -47,6 +49,7 @@
{% endfor %}
+{% endspaceless %}
{% endwith %}
{% endwith %}
{% endwith %}
@@ -104,8 +107,6 @@
left: 0;
border: 1px solid black;
border-radius: 2px;
-}
-.template-caluire-reservations-enfant .content input[disabled] + span::before {
border: 1px solid #aaa;
}
.template-caluire-reservations-enfant .content input[disabled] + span::after {
@@ -196,6 +197,14 @@ $('.template-caluire-reservations-enfant li.day-title').each(function(idx, elem)
$(elem).hide();
}
});
+/* init first week shown */
+var $cell = $('.template-caluire-reservations-enfant');
+$('li', $cell).removeClass('shown');
+if ($('li.day-title.current', $cell).length) {
+ $('li.day-title.current', $cell).parent().parent().addClass('shown');
+} else {
+ $('li', $cell).first().addClass('shown');
+}
$('.template-caluire-reservations-enfant input').on('change', function() {
if ($(this).is(':checked')) {
var $current_li = $(this).parents('li').first();