From 0eb5c939d92a1c615063b4581dcd89d2feee9998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien?= Date: Mon, 6 Jul 2020 18:07:43 +0200 Subject: [PATCH] Fix datepicker initialization dates with safari and IE. --- assets/js/backend_calendar_default_view.js | 4 ++-- assets/js/backend_calendar_table_view.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/backend_calendar_default_view.js b/assets/js/backend_calendar_default_view.js index 3401b12e..0fb63d2a 100755 --- a/assets/js/backend_calendar_default_view.js +++ b/assets/js/backend_calendar_default_view.js @@ -1343,8 +1343,8 @@ window.BackendCalendarDefaultView = window.BackendCalendarDefaultView || {}; } // Preselect time - $('#start-datetime').datepicker('setDate', new Date(start.format('YYYY-MM-DD HH:mm:ss'))); - $('#end-datetime').datepicker('setDate', new Date(end.format('YYYY-MM-DD HH:mm:ss'))); + $('#start-datetime').datepicker('setDate', new Date(start.format('YYYY/MM/DD HH:mm:ss'))); + $('#end-datetime').datepicker('setDate', new Date(end.format('YYYY/MM/DD HH:mm:ss'))); return false; }, diff --git a/assets/js/backend_calendar_table_view.js b/assets/js/backend_calendar_table_view.js index ac916746..c9ebf96a 100755 --- a/assets/js/backend_calendar_table_view.js +++ b/assets/js/backend_calendar_table_view.js @@ -697,8 +697,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {}; $('#select-provider').val(provider.id).trigger('change'); // Preselect time - $('#start-datetime').datepicker('setDate', new Date(start.format('YYYY-MM-DD HH:mm:ss'))); - $('#end-datetime').datepicker('setDate', new Date(end.format('YYYY-MM-DD HH:mm:ss'))); + $('#start-datetime').datepicker('setDate', new Date(start.format('YYY/MM/DD HH:mm:ss'))); + $('#end-datetime').datepicker('setDate', new Date(end.format('YYYY/MM/DD HH:mm:ss'))); return false; },