@instructure/ui-date-input 10.4.2-snapshot-6 → 10.4.2-snapshot-7
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 +5 -2
- package/es/DateInput2/index.js +2 -3
- package/lib/DateInput2/index.js +2 -3
- package/package.json +20 -20
- package/src/DateInput2/index.tsx +3 -3
- package/src/index.ts +1 -0
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,9 +3,12 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
-
## [10.4.2-snapshot-
|
6
|
+
## [10.4.2-snapshot-7](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.4.2-snapshot-7) (2024-10-31)
|
7
7
|
|
8
|
-
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **ui-date-input:** fix DateInput2 to update messages properly ([553a235](https://github.com/instructure/instructure-ui/commit/553a2351fc7f8c6d012d4001ff49c2450d29ee97))
|
9
12
|
|
10
13
|
|
11
14
|
|
package/es/DateInput2/index.js
CHANGED
@@ -163,9 +163,8 @@ const DateInput2 = ({
|
|
163
163
|
setShowPopover = _useState4[1];
|
164
164
|
useEffect(() => {
|
165
165
|
// don't set input messages if there is an internal error set already
|
166
|
-
if (
|
167
|
-
|
168
|
-
}
|
166
|
+
if (inputMessages.find(m => m.text === invalidDateErrorMessage)) return;
|
167
|
+
setInputMessages(messages || []);
|
169
168
|
}, [messages]);
|
170
169
|
useEffect(() => {
|
171
170
|
const _parseDate = parseDate(value),
|
package/lib/DateInput2/index.js
CHANGED
@@ -172,9 +172,8 @@ const DateInput2 = ({
|
|
172
172
|
setShowPopover = _useState4[1];
|
173
173
|
(0, _react.useEffect)(() => {
|
174
174
|
// don't set input messages if there is an internal error set already
|
175
|
-
if (
|
176
|
-
|
177
|
-
}
|
175
|
+
if (inputMessages.find(m => m.text === invalidDateErrorMessage)) return;
|
176
|
+
setInputMessages(messages || []);
|
178
177
|
}, [messages]);
|
179
178
|
(0, _react.useEffect)(() => {
|
180
179
|
const _parseDate = parseDate(value),
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@instructure/ui-date-input",
|
3
|
-
"version": "10.4.2-snapshot-
|
3
|
+
"version": "10.4.2-snapshot-7",
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
6
6
|
"module": "./es/index.js",
|
@@ -23,11 +23,11 @@
|
|
23
23
|
},
|
24
24
|
"license": "MIT",
|
25
25
|
"devDependencies": {
|
26
|
-
"@instructure/ui-axe-check": "10.4.2-snapshot-
|
27
|
-
"@instructure/ui-babel-preset": "10.4.2-snapshot-
|
28
|
-
"@instructure/ui-buttons": "10.4.2-snapshot-
|
29
|
-
"@instructure/ui-scripts": "10.4.2-snapshot-
|
30
|
-
"@instructure/ui-test-utils": "10.4.2-snapshot-
|
26
|
+
"@instructure/ui-axe-check": "10.4.2-snapshot-7",
|
27
|
+
"@instructure/ui-babel-preset": "10.4.2-snapshot-7",
|
28
|
+
"@instructure/ui-buttons": "10.4.2-snapshot-7",
|
29
|
+
"@instructure/ui-scripts": "10.4.2-snapshot-7",
|
30
|
+
"@instructure/ui-test-utils": "10.4.2-snapshot-7",
|
31
31
|
"@testing-library/jest-dom": "^6.4.6",
|
32
32
|
"@testing-library/react": "^16.0.1",
|
33
33
|
"@testing-library/user-event": "^14.5.2",
|
@@ -35,20 +35,20 @@
|
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
37
|
"@babel/runtime": "^7.25.6",
|
38
|
-
"@instructure/emotion": "10.4.2-snapshot-
|
39
|
-
"@instructure/shared-types": "10.4.2-snapshot-
|
40
|
-
"@instructure/ui-calendar": "10.4.2-snapshot-
|
41
|
-
"@instructure/ui-form-field": "10.4.2-snapshot-
|
42
|
-
"@instructure/ui-i18n": "10.4.2-snapshot-
|
43
|
-
"@instructure/ui-icons": "10.4.2-snapshot-
|
44
|
-
"@instructure/ui-popover": "10.4.2-snapshot-
|
45
|
-
"@instructure/ui-position": "10.4.2-snapshot-
|
46
|
-
"@instructure/ui-prop-types": "10.4.2-snapshot-
|
47
|
-
"@instructure/ui-react-utils": "10.4.2-snapshot-
|
48
|
-
"@instructure/ui-selectable": "10.4.2-snapshot-
|
49
|
-
"@instructure/ui-testable": "10.4.2-snapshot-
|
50
|
-
"@instructure/ui-text-input": "10.4.2-snapshot-
|
51
|
-
"@instructure/ui-utils": "10.4.2-snapshot-
|
38
|
+
"@instructure/emotion": "10.4.2-snapshot-7",
|
39
|
+
"@instructure/shared-types": "10.4.2-snapshot-7",
|
40
|
+
"@instructure/ui-calendar": "10.4.2-snapshot-7",
|
41
|
+
"@instructure/ui-form-field": "10.4.2-snapshot-7",
|
42
|
+
"@instructure/ui-i18n": "10.4.2-snapshot-7",
|
43
|
+
"@instructure/ui-icons": "10.4.2-snapshot-7",
|
44
|
+
"@instructure/ui-popover": "10.4.2-snapshot-7",
|
45
|
+
"@instructure/ui-position": "10.4.2-snapshot-7",
|
46
|
+
"@instructure/ui-prop-types": "10.4.2-snapshot-7",
|
47
|
+
"@instructure/ui-react-utils": "10.4.2-snapshot-7",
|
48
|
+
"@instructure/ui-selectable": "10.4.2-snapshot-7",
|
49
|
+
"@instructure/ui-testable": "10.4.2-snapshot-7",
|
50
|
+
"@instructure/ui-text-input": "10.4.2-snapshot-7",
|
51
|
+
"@instructure/ui-utils": "10.4.2-snapshot-7",
|
52
52
|
"moment-timezone": "^0.5.45",
|
53
53
|
"prop-types": "^15.8.1"
|
54
54
|
},
|
package/src/DateInput2/index.tsx
CHANGED
@@ -184,9 +184,9 @@ const DateInput2 = ({
|
|
184
184
|
|
185
185
|
useEffect(() => {
|
186
186
|
// don't set input messages if there is an internal error set already
|
187
|
-
if (
|
188
|
-
|
189
|
-
|
187
|
+
if (inputMessages.find((m) => m.text === invalidDateErrorMessage)) return
|
188
|
+
|
189
|
+
setInputMessages(messages || [])
|
190
190
|
}, [messages])
|
191
191
|
|
192
192
|
useEffect(() => {
|
package/src/index.ts
CHANGED