@desynova-digital/components 8.19.48 → 8.19.49

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.
@@ -247,7 +247,12 @@ var DatePicker = function (_Component) {
247
247
  dateVal = new Date(dateVal);
248
248
  view[idx] = dateVal;
249
249
  return dateVal;
250
- }if (dateVal.trim()) {
250
+ }if (typeof dateVal === 'string') {
251
+ if (dateVal.trim()) {
252
+ view[idx] = DateUtilities.stringToDate(dateVal);
253
+ return DateUtilities.stringToDate(dateVal);
254
+ }
255
+ } else {
251
256
  view[idx] = DateUtilities.stringToDate(dateVal);
252
257
  return DateUtilities.stringToDate(dateVal);
253
258
  }
@@ -623,11 +628,14 @@ var _initialiseProps = function _initialiseProps() {
623
628
  if (typeof dateVal === 'number') {
624
629
  dateVal = new Date(dateVal);
625
630
  view[idx] = dateVal;
626
-
627
631
  return dateVal;
628
- }if (dateVal.trim()) {
632
+ }if (typeof dateVal === 'string') {
633
+ if (dateVal.trim()) {
634
+ view[idx] = DateUtilities.stringToDate(dateVal);
635
+ return DateUtilities.stringToDate(dateVal);
636
+ }
637
+ } else {
629
638
  view[idx] = DateUtilities.stringToDate(dateVal);
630
-
631
639
  return DateUtilities.stringToDate(dateVal);
632
640
  }
633
641
  });
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "8.19.48",
3
+ "version": "8.19.49",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "8.19.48",
10
+ "@desynova-digital/tokens": "8.19.49",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },