Fix datepicker initialization dates with safari and IE.

This commit is contained in:
Sébastien 2020-07-06 18:07:43 +02:00
parent 16c18f9b99
commit 0eb5c939d9
2 changed files with 4 additions and 4 deletions

View file

@ -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;
},

View file

@ -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;
},