@7shifts/sous-chef 2.3.1 → 2.3.2

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.
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3
3
  import ReactDOM from 'react-dom';
4
4
  import Select, { components } from 'react-select';
5
5
  import DayPickerInput from 'react-day-picker/DayPickerInput';
6
- import { startOfDay } from 'date-fns';
6
+ import { isDate, startOfDay } from 'date-fns';
7
7
  import { DateUtils } from 'react-day-picker';
8
8
  import dateFnsFormat from 'date-fns/format';
9
9
  import dateFnsParse from 'date-fns/parse';
@@ -4891,7 +4891,7 @@ var useDateFieldControllers = function useDateFieldControllers(_ref) {
4891
4891
  error: error,
4892
4892
  value: value,
4893
4893
  onChange: function onChange(newValue) {
4894
- return newValue && _onChange && _onChange(startOfDay(newValue));
4894
+ return _onChange && _onChange(isDate(newValue) ? startOfDay(newValue) : newValue);
4895
4895
  },
4896
4896
  onBlur: function onBlur() {
4897
4897
  return _onBlur && _onBlur();