mig-schema-table 3.0.59 → 3.0.60

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.
@@ -4,6 +4,7 @@ import { t } from "../../../inc/string";
4
4
  import { DEFAULT_DATE_FORMAT, DEFAULT_DATE_TIME_FORMAT, } from "../../../inc/constant";
5
5
  import DatePicker from "react-datepicker";
6
6
  import nl from "date-fns/locale/nl";
7
+ import { endOfDay } from "date-fns";
7
8
  const FilterFormComponent = ({ columnFilterValue, onChange, onInputKeyDown, propConfig, propIsRequired, propName, propSchema, }) => {
8
9
  const { type, format, minimum, maximum } = propSchema;
9
10
  const value = columnFilterValue;
@@ -66,12 +67,11 @@ const FilterFormComponent = ({ columnFilterValue, onChange, onInputKeyDown, prop
66
67
  onChange(undefined);
67
68
  return;
68
69
  }
69
- if (dateRangeValue.from &&
70
- date &&
71
- date < dateRangeValue.from) {
70
+ const to = date ? endOfDay(date) : undefined;
71
+ if (dateRangeValue.from && to && to < dateRangeValue.from) {
72
72
  return;
73
73
  }
74
- onChange(Object.assign(Object.assign({}, columnFilterValue), { to: date || undefined }));
74
+ onChange(Object.assign(Object.assign({}, columnFilterValue), { to }));
75
75
  }, placeholderText: dateFormat, isClearable: true, startDate: dateRangeValue.from, endDate: dateRangeValue.to, showTimeSelect: format === "date-time", timeIntervals: 15, shouldCloseOnSelect: format === "date" })] }))] }))] }));
76
76
  }
77
77
  // falls through
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mig-schema-table",
3
- "version": "3.0.59",
3
+ "version": "3.0.60",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/"