diff --git a/client/core/src/datePicker/datePicker.js b/client/core/src/datePicker/datePicker.js index 5a5d3dc20..70a6344b8 100644 --- a/client/core/src/datePicker/datePicker.js +++ b/client/core/src/datePicker/datePicker.js @@ -4,7 +4,7 @@ import Flatpickr from 'vendor/src/flatpickr'; import './style.scss'; // equivalences to format date between flatpicker and angularjs -export const fromatEquivalence = { +export const formatEquivalence = { d: 'dd', // Day of the month, 2 digits with leading zeros (01 to 31) j: 'd', // Day of the month without leading zeros (1 to 31) m: 'MM', // Month in year, padded (01-12) @@ -67,7 +67,7 @@ class DatePicker extends Component { let parts = []; aux.forEach( val => { - parts.push(fromatEquivalence[val]); + parts.push(formatEquivalence[val]); } ); if (string.indexOf(' ') !== -1 || string.indexOf('T') !== -1) { // datetime format @@ -152,7 +152,7 @@ class DatePicker extends Component { } format.forEach( val => { - if (!fromatEquivalence[val]) { + if (!formatEquivalence[val]) { throw new Error(`Error in dateFormat ${this.iniOptions.dateFormat}: is not like Flatpickr Formatting Token https://chmln.github.io/flatpickr/formatting/`); } }