oolib 2.163.0 → 2.163.1

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.
@@ -53,6 +53,9 @@ var Typo2_1 = require("../Typo2");
53
53
  var styled_1 = require("./styled");
54
54
  var TextInputs_1 = require("../TextInputs");
55
55
  var __1 = require("../../..");
56
+ var es_1 = require("date-fns/locale/es");
57
+ var react_datepicker_1 = require("react-datepicker");
58
+ (0, react_datepicker_1.registerLocale)('es', es_1.es);
56
59
  function DateRangePicker_(props) {
57
60
  var onChange = props.onChange, value = props.value, id = props.id, readOnly = props.readOnly, futureDateOnly = props.futureDateOnly, previousDateOnly = props.previousDateOnly, allowPresentlyOngoing = props.allowPresentlyOngoing, invert = props.invert, disabled = props.disabled, debug = props.debug, startDateLabel = props.startDateLabel, endDateLabel = props.endDateLabel;
58
61
  var _a = (0, react_1.useState)(value[0] || null), startDate = _a[0], setStartDate = _a[1];
@@ -104,7 +107,7 @@ function DateRangePicker_(props) {
104
107
  react_1.default.createElement(styled_1.StyledDateRangeInputWrapper, { invert: invert, readOnly: readOnly },
105
108
  react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column" } },
106
109
  react_1.default.createElement(Typo2_1.UI_CAPTION, null, startDateLabel),
107
- react_1.default.createElement(styled_1.StyledDatePicker, { className: 'UI_BODY_SM', selected: startDate, onChange: function (date) { return handleOnChange(0, date); }, selectsStart: true, startDate: startDate, endDate: endDate, minDate: getMinDate(false), maxDate: getMaxDate(), readOnly: readOnly, disabled: disabled, dateFormat: "MM/dd/yyyy" })),
110
+ react_1.default.createElement(styled_1.StyledDatePicker, { locale: "es", className: 'UI_BODY_SM', selected: startDate, onChange: function (date) { return handleOnChange(0, date); }, selectsStart: true, startDate: startDate, endDate: endDate, minDate: getMinDate(false), maxDate: getMaxDate(), readOnly: readOnly, disabled: disabled, dateFormat: "MM/dd/yyyy" })),
108
111
  react_1.default.createElement(styled_1.StyledDateRangeInputDivider, null),
109
112
  react_1.default.createElement("div", { style: { display: "flex", flexDirection: "column" } },
110
113
  react_1.default.createElement(Typo2_1.UI_CAPTION, null, endDateLabel),
@@ -112,7 +115,7 @@ function DateRangePicker_(props) {
112
115
  react_1.default.createElement("div", { style: { border: "1px solid ".concat(__1.colors2.grey20), padding: '8px 20px', borderRadius: '5px', width: '120px', background: "".concat(__1.colors2.grey5) } },
113
116
  react_1.default.createElement(TextInputs_1.TextInput, { value: "OnGoing", readOnly: true }))
114
117
  :
115
- react_1.default.createElement(styled_1.StyledDatePicker, { className: 'UI_BODY_SM', selected: endDate, onChange: function (date) { return handleOnChange(1, date); }, selectsEnd: true, startDate: startDate, endDate: endDate, minDate: getMinDate(true), maxDate: getMaxDate(), readOnly: readOnly, disabled: disabled || (value && value[1] === null), dateFormat: "MM/dd/yyyy" }))),
118
+ react_1.default.createElement(styled_1.StyledDatePicker, { locale: "es", className: 'UI_BODY_SM', selected: endDate, onChange: function (date) { return handleOnChange(1, date); }, selectsEnd: true, startDate: startDate, endDate: endDate, minDate: getMinDate(true), maxDate: getMaxDate(), readOnly: readOnly, disabled: disabled || (value && value[1] === null), dateFormat: "MM/dd/yyyy" }))),
116
119
  !readOnly && allowPresentlyOngoing && (react_1.default.createElement("div", { style: { marginTop: '0.5rem' } },
117
120
  react_1.default.createElement(RadioAndCheckbox_1.CheckboxInput, { option: { display: 'Presently Ongoing', value: 'Ongoing' }, value: value && value[1] === null
118
121
  ? [{ display: 'Presently Ongoing', value: 'Ongoing' }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.163.0",
3
+ "version": "2.163.1",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",