diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index e82370651..e8bea0d8d 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -63,7 +63,7 @@ class DatePicker extends Component { } _formatFlat2Angular(string) { // change string Flatpickr format to angular format (d-m-Y -> dd-MM-yyyy) - let aux = string.split(/[.,/ :-]/); + let aux = string.split(/[T.,/ :-]/); let parts = []; aux.forEach( val => { @@ -88,8 +88,8 @@ class DatePicker extends Component { } else if (!this.iniOpts.dateFormat || (this.iniOpts.dateFormat && this.iniOpts.dateFormat.startsWith('Y-m-d'))) { model = value; } else { - let formats = this.iniOpts.dateFormat.split(/[.,/ :-]/); - let aux = value.split(/[.,/ :-]/); + let formats = this.iniOpts.dateFormat.split(/[T.,/ :-]/); + let aux = value.split(/[T.,/ :-]/); let date = {}; formats.forEach( (k, i) => { @@ -129,7 +129,6 @@ class DatePicker extends Component { } } model = `${dateStr} ${hourStr}`.trim(); - } if (this.model !== model) { this.model = model;