@trackunit/react-components 0.0.152 → 0.0.154

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.
@@ -3,21 +3,21 @@ import { BaseInputProps } from "../BaseInput";
3
3
  declare type BaseInputExposedProps = Omit<BaseInputProps, "defaultValue" | "min" | "max" | "value">;
4
4
  export interface DateInputProps extends BaseInputExposedProps {
5
5
  /**
6
- * A min value in type Date
6
+ * A min value with type Date added
7
7
  */
8
- min?: Date;
8
+ min?: Date | string | number;
9
9
  /**
10
- * A max date value in type Date
10
+ * A max value with type Date added
11
11
  */
12
- max?: Date;
12
+ max?: Date | string | number;
13
13
  /**
14
- * A default value in type Date
14
+ * A default value with type Date added
15
15
  */
16
- defaultValue?: Date;
16
+ defaultValue?: Date | string | number;
17
17
  /**
18
- * A value in type Date
18
+ * A value with type Date added
19
19
  */
20
- value?: Date;
20
+ value?: Date | string | number;
21
21
  }
22
22
  /**
23
23
  * A wrapper around BaseInput with a pop-up day picker.
package/index.js CHANGED
@@ -1857,7 +1857,7 @@ const DateInput = forwardRef((_a, ref) => {
1857
1857
  } = _a,
1858
1858
  rest = __rest(_a, ["min", "max", "defaultValue", "value"]);
1859
1859
 
1860
- const formatDateToInputString = date => date ? format(date, "yyyy-MM-dd") : date; // @ts-ignore
1860
+ const formatDateToInputString = date => date instanceof Date ? format(date, "yyyy-MM-dd") : date; // @ts-ignore
1861
1861
  // Chrome needs it's default icon to have datepicker functionality.
1862
1862
  // window.chrome doesn't exist in TS but is available on chrome browsers.
1863
1863
  // If it fails it will just show our icon.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "0.0.152",
3
+ "version": "0.0.154",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {