carbon-react 104.19.0 → 104.19.1

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.
@@ -39,7 +39,12 @@ function isDateValid(date) {
39
39
  return date && date.toString() !== "Invalid Date";
40
40
  }
41
41
 
42
- function hasMatchedFormat(formatString, valueString) {
42
+ function hasMatchedFormat(formatString, valueString, fullFormat, fullValue) {
43
+ if (formatString.includes("d")) {
44
+ return formatString.length === valueString.length && (0, _fp.isMatch)(fullFormat.join("."), fullValue.join(".")) // need to check day value with month value
45
+ ;
46
+ }
47
+
43
48
  return formatString.length === valueString.length && (0, _fp.isMatch)(formatString, valueString);
44
49
  }
45
50
 
@@ -66,7 +71,7 @@ function makeSeparatedValues(arr, str) {
66
71
  }
67
72
 
68
73
  function checkForCompleteMatch(formatArray, valueArray) {
69
- return formatArray.every((formatString, i) => hasMatchedFormat(formatString, valueArray[i]));
74
+ return formatArray.every((formatString, i) => hasMatchedFormat(formatString, valueArray[i], formatArray, valueArray));
70
75
  }
71
76
 
72
77
  function findMatchWithNoSeparators(valueString, formatString) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "104.19.0",
3
+ "version": "104.19.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {