@spaced-out/ui-design-system 0.1.111 → 0.1.112

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.1.112](https://github.com/spaced-out/ui-design-system/compare/v0.1.111...v0.1.112) (2024-07-15)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * selected date range story ([#242](https://github.com/spaced-out/ui-design-system/issues/242)) ([037042f](https://github.com/spaced-out/ui-design-system/commit/037042f5333ab711be5df2c94456cd8333baaaa4))
11
+
5
12
  ### [0.1.111](https://github.com/spaced-out/ui-design-system/compare/v0.1.110...v0.1.111) (2024-07-15)
6
13
 
7
14
 
@@ -264,7 +264,7 @@ const getValidDates = (selectedDateRange, minDate, maxDate, onError) => {
264
264
  const isMinMaxRangeInvalid = !isRangeValid(validMinDate, validMaxDate, DATE_RANGE_PICKER_ERRORS.MIN_MAX_INVALID);
265
265
 
266
266
  // if startDate is defined and then it should be after minDate
267
- const isStartDateInvalid = isMinMaxRangeInvalid || (0, _lodash.isEmpty)(startDate) || !isRangeValid(minDate, startDate, DATE_RANGE_PICKER_ERRORS.START_DATE_EARLY);
267
+ const isStartDateInvalid = isMinMaxRangeInvalid || (0, _lodash.isEmpty)(startDate) || !isRangeValid(validMinDate, startDate, DATE_RANGE_PICKER_ERRORS.START_DATE_EARLY);
268
268
  if (isMinMaxRangeInvalid || isStartDateInvalid) {
269
269
  return {
270
270
  validTimezone,
@@ -278,7 +278,7 @@ const getValidDates = (selectedDateRange, minDate, maxDate, onError) => {
278
278
  }
279
279
 
280
280
  // if endDate is defined then it should be before maxDate
281
- const isEndDateInvalid = (0, _lodash.isEmpty)(endDate) || !isRangeValid(endDate, maxDate, DATE_RANGE_PICKER_ERRORS.END_DATE_LATE);
281
+ const isEndDateInvalid = (0, _lodash.isEmpty)(endDate) || !isRangeValid(endDate, validMaxDate, DATE_RANGE_PICKER_ERRORS.END_DATE_LATE);
282
282
 
283
283
  // startDate should be before endDate
284
284
  const isStartEndRangeInvalid = isEndDateInvalid || !isRangeValid(startDate, endDate, DATE_RANGE_PICKER_ERRORS.START_DATE_LATE);
@@ -290,7 +290,7 @@ export const getValidDates = (
290
290
  isMinMaxRangeInvalid ||
291
291
  isEmpty(startDate) ||
292
292
  !isRangeValid(
293
- minDate,
293
+ validMinDate,
294
294
  startDate,
295
295
  DATE_RANGE_PICKER_ERRORS.START_DATE_EARLY,
296
296
  );
@@ -307,7 +307,11 @@ export const getValidDates = (
307
307
  // if endDate is defined then it should be before maxDate
308
308
  const isEndDateInvalid =
309
309
  isEmpty(endDate) ||
310
- !isRangeValid(endDate, maxDate, DATE_RANGE_PICKER_ERRORS.END_DATE_LATE);
310
+ !isRangeValid(
311
+ endDate,
312
+ validMaxDate,
313
+ DATE_RANGE_PICKER_ERRORS.END_DATE_LATE,
314
+ );
311
315
 
312
316
  // startDate should be before endDate
313
317
  const isStartEndRangeInvalid =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.1.111",
3
+ "version": "0.1.112",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {