@7shifts/sous-chef 3.67.0 → 3.67.1-beta.0

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
@@ -11639,11 +11639,14 @@ var DateField = function DateField(_ref) {
11639
11639
  setInputValue(event.target.value);
11640
11640
  },
11641
11641
  onBlur: function onBlur(event) {
11642
- controllers.onBlur();
11643
- if (event.target.value === '') {
11644
- // @ts-expect-error the types will be changed on the next major release https://github.com/7shifts/sous-chef/pull/356
11645
- controllers.onChange(undefined);
11646
- }
11642
+ // This is to give some time for calendar click to set the date value. Otherwise, this `undefined` will override the selected date in mobile devices.
11643
+ setTimeout(function () {
11644
+ controllers.onBlur();
11645
+ if (event.target.value === '') {
11646
+ // @ts-expect-error the types will be changed on the next major release https://github.com/7shifts/sous-chef/pull/356
11647
+ controllers.onChange(undefined);
11648
+ }
11649
+ }, 10);
11647
11650
  },
11648
11651
  maxLength: format.length,
11649
11652
  value: inputValue