datepicker regex data with timezone
This commit is contained in:
parent
cd2560c8c6
commit
3cf33fe48b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue