linear-react-components-ui 1.1.9 → 1.1.10

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.
@@ -135,8 +135,10 @@ const DatePicker = props => {
135
135
  }
136
136
  }
137
137
  };
138
- const setValue = (valueParam, e) => {
138
+ const setValue = function () {
139
139
  var _inputRef$current2;
140
+ let valueParam = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
141
+ let e = arguments.length > 1 ? arguments[1] : undefined;
140
142
  if (showCalendar && setFocusOnSelect) (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
141
143
  if (props.onComplete) props.onComplete(e, valueParam);
142
144
  if (props.onChange) onInputChange({
@@ -228,11 +230,11 @@ const DatePicker = props => {
228
230
  if (onDenied && onDenied.unvisible) return null;
229
231
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BaseMask.default, _extends({}, props, {
230
232
  value: !valueState ? ' ' : valueState.format(_helpers.PT_BR_FORMAT),
231
- isDateField: true,
232
233
  mask: "00/00/0000",
233
- onComplete: (e, __, date) => {
234
- if (date) {
235
- setValue(date, e);
234
+ onComplete: e => {
235
+ if (e) {
236
+ var _e$target;
237
+ setValue((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.maskedValue, e);
236
238
  }
237
239
  },
238
240
  onBlur: onInputBlur,
@@ -241,7 +243,7 @@ const DatePicker = props => {
241
243
  },
242
244
  onKeyDown: onInputKeyDown,
243
245
  onChange: (e, __, date) => {
244
- if (date) onInputChange(e, date);
246
+ if (date) onInputChange(e, e.target.value);
245
247
  },
246
248
  inputRef: el => {
247
249
  inputRef.current = el;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",