indicator-ui 0.0.109 → 0.0.110

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.
package/dist/index.js CHANGED
@@ -9041,6 +9041,11 @@ function DateField({ value, disabled, required, isError, onChange, onFocus, date
9041
9041
  }
9042
9042
  };
9043
9043
  return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_FlexField__WEBPACK_IMPORTED_MODULE_4__.FlexField, { value: dateValue, onChange: handleChange, disabled: disabled, isError: isError, onFocus: onFocus, onBlur: onBlur, mask: dateFormat, blocks: {
9044
+ YYYY: {
9045
+ mask: react_imask__WEBPACK_IMPORTED_MODULE_2__.IMask.MaskedRange,
9046
+ from: minYear, // минимальный год
9047
+ to: maxYear, // максимальный год
9048
+ },
9044
9049
  yyyy: {
9045
9050
  mask: react_imask__WEBPACK_IMPORTED_MODULE_2__.IMask.MaskedRange,
9046
9051
  from: minYear, // минимальный год
@@ -9091,8 +9096,8 @@ __webpack_require__.r(__webpack_exports__);
9091
9096
 
9092
9097
 
9093
9098
  function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat = 'dd.MM.yyyy', timeFormat = 'HH:mm', outFormat = 'iso-8601', additionStyle, ...props }) {
9094
- const isInputDate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
9095
- const isInputTime = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);
9099
+ const isInputDate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value != undefined);
9100
+ const isInputTime = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(value != undefined);
9096
9101
  const getDateValue = () => {
9097
9102
  if (value === undefined)
9098
9103
  return undefined;
@@ -9106,9 +9111,11 @@ function DateTimeField({ value, fieldConfig = 'datetime', onChange, dateFormat =
9106
9111
  if (outFormat === 'iso-8601') {
9107
9112
  onChange(newValue.toISOString());
9108
9113
  }
9109
- const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newValue, { to: outFormat });
9110
- if (res != null && typeof res === 'string') {
9111
- onChange(res);
9114
+ else {
9115
+ const res = (0,_lib__WEBPACK_IMPORTED_MODULE_3__.saveFormatDate)(newValue, { to: outFormat });
9116
+ if (res != null && typeof res === 'string') {
9117
+ onChange(res);
9118
+ }
9112
9119
  }
9113
9120
  }
9114
9121
  };