@7shifts/sous-chef 3.31.1-beta2 → 3.31.1-beta3

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
@@ -9146,9 +9146,6 @@ var DateField = function DateField(_ref) {
9146
9146
  onFocus: function onFocus(e) {
9147
9147
  setShowCalendar(true);
9148
9148
  maskfy(e.target);
9149
- setTimeout(function () {
9150
- e.target.setSelectionRange(0, 0);
9151
- }, 10);
9152
9149
  },
9153
9150
  onClick: function onClick() {
9154
9151
  return setShowCalendar(true);
@@ -9161,7 +9158,13 @@ var DateField = function DateField(_ref) {
9161
9158
  controllers.onChange(parsedDate);
9162
9159
  }
9163
9160
  },
9164
- onBlur: controllers.onBlur,
9161
+ onBlur: function onBlur(event) {
9162
+ var parsedDate = parseDate(event.target.value, format);
9163
+ if (!parsedDate) {
9164
+ controllers.onChange(undefined);
9165
+ }
9166
+ controllers.onBlur();
9167
+ },
9165
9168
  defaultValue: getDefaultValue()
9166
9169
  })), showCalendar && React__default.createElement(Calendar, {
9167
9170
  onSelect: function onSelect(date) {