Commit 96c8e66d by Félicie

invalid date repaired

parent 9305e1ab
Pipeline #1484 passed with stage
in 1 minute 30 seconds
...@@ -120,7 +120,7 @@ function init_shifts_list() { ...@@ -120,7 +120,7 @@ function init_shifts_list() {
for (shift of incoming_shifts) { for (shift of incoming_shifts) {
let shift_line_template = $("#selectable_shift_line_template"); let shift_line_template = $("#selectable_shift_line_template");
let datetime_shift_start = new Date(shift.date_begin); let datetime_shift_start = new Date(shift.date_begin.replace(/\s/, 'T'));
let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options); let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options);
......
...@@ -138,7 +138,7 @@ function update_content() { ...@@ -138,7 +138,7 @@ function update_content() {
*/ */
function prepare_shift_line_template(date_begin) { function prepare_shift_line_template(date_begin) {
let shift_line_template = $("#shift_line_template"); let shift_line_template = $("#shift_line_template");
let datetime_shift_start = new Date(date_begin); let datetime_shift_start = new Date(date_begin.replace(/\s/, 'T'));
let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options); let f_date_shift_start = datetime_shift_start.toLocaleDateString("fr-fr", date_options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment