secullum-react-native-ui 4.5.1-beta.12 → 4.5.1-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,7 +92,7 @@ class DatePicker extends React.Component {
|
|
|
92
92
|
React.createElement(react_native_1.View, { nativeID: nativeID, style: [styles.container, style, disabled ? styles.readonly : null] },
|
|
93
93
|
React.createElement(react_native_1.View, null,
|
|
94
94
|
React.createElement(react_native_1.Text, { style: styles.label }, label),
|
|
95
|
-
React.createElement(react_native_1.Text, { style: styles.value }, value ? (0, format_1.formatDate)(value, 'dddd,
|
|
95
|
+
React.createElement(react_native_1.Text, { style: styles.value }, value ? (0, format_1.formatDate)(value, 'dddd, dd/MM/yyyy') : '')),
|
|
96
96
|
!disabled && (React.createElement(ImageButton_1.ImageButton, { icon: value && clearable ? 'times' : 'calendar', style: styles.clearIcon, iconColor: value && clearable ? theme.textColor1 : theme.textColor2, onPress: value && clearable ? this.handleClear : this.handlePress, hitBoxSize: 30 })),
|
|
97
97
|
react_native_1.Platform.OS !== 'web' && (React.createElement(react_native_modal_datetime_picker_1.default, { date: value || undefined, isVisible: showModal, onConfirm: this.handleConfirm, onCancel: this.handleCancel, isDarkModeEnabled: isDarkModeEnabled,
|
|
98
98
|
//@ts-ignore
|
|
@@ -103,7 +103,7 @@ class RangeDatePicker extends React.Component {
|
|
|
103
103
|
render() {
|
|
104
104
|
const { label, startDate, endDate, style, nativeID } = this.props;
|
|
105
105
|
const { showStartDateModal, showEndDateModal, isDarkModeEnabled } = this.state;
|
|
106
|
-
const displayFormat = 'MMM D,
|
|
106
|
+
const displayFormat = 'MMM D, yyyy';
|
|
107
107
|
const displayText = (0, format_1.formatDate)(startDate, displayFormat) +
|
|
108
108
|
' - ' +
|
|
109
109
|
(0, format_1.formatDate)(endDate, displayFormat);
|
|
@@ -88,7 +88,7 @@ class RangeDatePicker extends React.Component {
|
|
|
88
88
|
render() {
|
|
89
89
|
const { label, startDate, endDate, style, nativeID } = this.props;
|
|
90
90
|
const { showStartDateModal } = this.state;
|
|
91
|
-
const displayFormat = 'MMM
|
|
91
|
+
const displayFormat = 'MMM d, yyyy';
|
|
92
92
|
const displayText = (0, format_1.formatDate)(startDate, displayFormat) +
|
|
93
93
|
' - ' +
|
|
94
94
|
(0, format_1.formatDate)(endDate, displayFormat);
|
package/lib/modules/format.js
CHANGED
|
@@ -90,9 +90,10 @@ const fixSpanishLowercase = (formattedDate) => {
|
|
|
90
90
|
return formattedDate;
|
|
91
91
|
};
|
|
92
92
|
const formatDate = (date, format) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
console.log(date);
|
|
94
|
+
const local = (0, exports.getDateFnsLocale)();
|
|
95
|
+
console.log(local);
|
|
96
|
+
const formattedDate = (0, date_fns_1.format)(date, format, local);
|
|
96
97
|
switch (currentLocale) {
|
|
97
98
|
case 'pt':
|
|
98
99
|
return fixPortugueseLowercase(formattedDate);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secullum-react-native-ui",
|
|
3
|
-
"version": "4.5.1-beta.
|
|
3
|
+
"version": "4.5.1-beta.13",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"types": "lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@react-native-community/datetimepicker": "^3.0.9",
|
|
23
|
-
"date-fns": "^2.
|
|
23
|
+
"date-fns": "^2.29.3",
|
|
24
24
|
"react-date-range": "^1.4.0",
|
|
25
25
|
"react-native-drawer-layout": "^2.0.0",
|
|
26
26
|
"react-native-elevated-view": "^0.0.6",
|