Skip to content

Commit 0708cc0

Browse files
authored
Merge pull request #25 from simoneanam/2.2
[FIX] datetime readonly, pre_process_data init by submitted data for …
2 parents 69ecd7a + a207dbf commit 0708cc0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

web-client/core/main/widgets_form.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ def json_from_str(self, str_test) -> dict:
340340
return str_test
341341

342342
def pre_process_data(self, data):
343-
self.init_form(data)
343+
self.init_form(data, True)
344344
self.builder.compute_data()
345345
sub_data = self.builder.main.form_data.copy()
346-
self.init_form(data)
346+
self.init_form(data, True)
347347
return sub_data

web-client/core/themes/italia/templates/components/datetime/form_date_time.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
display: block;
44
z-index: 1070;
55
}
6+
.it-datepicker-wrapper .it-date-datepicker[readonly] {
7+
background: hsl(225, 32.2033898305%, 92.625%);
8+
}
69
</style>
710

811
<div class="{{ customClass }} {% if hidden %} d-none {% endif %} ">
@@ -54,10 +57,8 @@
5457
allowInput: true,
5558
enableTime: {{ is_time | tojson }},
5659
{% else %}
57-
{% if value %}
58-
{% if is_date %} noCalendar: true, {% endif %}
59-
{% if is_time %} enableTime: false, {% endif %}
60-
{% endif %}
60+
{% if is_date %} noCalendar: true, {% endif %}
61+
{% if is_time %} enableTime: false, {% endif %}
6162
{% endif %}
6263
{% if is_time and not is_date %}
6364
noCalendar: true,

0 commit comments

Comments
 (0)