@luminati-io/uikit 1.9.3 → 1.9.4-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/uikit.umd.js CHANGED
@@ -23798,14 +23798,17 @@ var getDefaultMonth = function getDefaultMonth(value) {
23798
23798
  if (value instanceof Date) return value;
23799
23799
  if (value && _typeof(value) == 'object') return value.from || value.to;
23800
23800
  };
23801
+ var isValidDateValue = function isValidDateValue(value) {
23802
+ return !Number.isNaN(new Date(value).getTime());
23803
+ };
23801
23804
  var getDate = function getDate(value) {
23802
- return value ? new Date(value) : undefined;
23805
+ return isValidDateValue(value) ? new Date(value) : undefined;
23803
23806
  };
23804
23807
  var getRange = function getRange(value) {
23805
23808
  if (!value || _typeof(value) != 'object') return undefined;
23806
23809
  return {
23807
- from: value.from ? new Date(value.from) : undefined,
23808
- to: value.to ? new Date(value.to) : undefined
23810
+ from: isValidDateValue(value.from) ? new Date(value.from) : undefined,
23811
+ to: isValidDateValue(value.to) ? new Date(value.to) : undefined
23809
23812
  };
23810
23813
  };
23811
23814
  var useValue = function useValue(props) {