@rolster/react-components 18.15.34 → 18.15.35

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/es/index.js CHANGED
@@ -2459,7 +2459,7 @@ function RlsPickerDateRange({ automatic, date: datePicker, disabled, formControl
2459
2459
  }), children: jsxRuntimeExports.jsxs("div", { className: "rls-picker-date-range__actions", children: [jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--cancel", children: jsxRuntimeExports.jsx(RlsButton, { type: "ghost", onClick: onCancel, children: reactI18n('dateActionCancel') }) }), jsxRuntimeExports.jsx("div", { className: "rls-picker-date-range__actions--ok", children: jsxRuntimeExports.jsx(RlsButton, { type: "raised", onClick: onSelect, children: reactI18n('dateActionSelect') }) })] }) })] }));
2460
2460
  }
2461
2461
 
2462
- function RlsFieldDateRange({ children, date: datePicker, disabled, formControl, maxDate, minDate, msgErrorDisabled, placeholder, rlsTheme }) {
2462
+ function RlsFieldDateRange({ children, date: datePicker, disabled, formControl, maxDate, minDate, msgErrorDisabled, placeholder, rlsTheme, value: defaultValue }) {
2463
2463
  const currentRange = formControl?.value || DateRange.now();
2464
2464
  const currentDate = datePicker || new Date();
2465
2465
  const [value, setValue] = useState(currentRange);
@@ -2469,7 +2469,7 @@ function RlsFieldDateRange({ children, date: datePicker, disabled, formControl,
2469
2469
  }
2470
2470
  function onClickAction() {
2471
2471
  if (value) {
2472
- formControl?.setValue(undefined);
2472
+ formControl?.setValue(defaultValue);
2473
2473
  setValue(undefined);
2474
2474
  }
2475
2475
  else {