@instructure/ui-date-input 10.3.1-snapshot-4 → 10.3.1-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 +2 -1
- package/es/DateInput2/index.js +2 -2
- package/lib/DateInput2/index.js +2 -2
- package/package.json +20 -20
- package/src/DateInput2/index.tsx +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,12 +3,13 @@
|
|
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.3.1-snapshot-
|
6
|
+
## [10.3.1-snapshot-7](https://github.com/instructure/instructure-ui/compare/v10.3.0...v10.3.1-snapshot-7) (2024-10-10)
|
7
7
|
|
8
8
|
|
9
9
|
### Bug Fixes
|
10
10
|
|
11
11
|
* **ui-calendar:** fix duplicate dates for certain timezones ([f9181aa](https://github.com/instructure/instructure-ui/commit/f9181aa88c35eba1e374240505d32bf618c46b04))
|
12
|
+
* **ui-date-input:** fix messages prop sometimes not populating in DateInput2 ([28d2601](https://github.com/instructure/instructure-ui/commit/28d2601f55ec418e32316b77604ec15d6368d23c))
|
12
13
|
|
13
14
|
|
14
15
|
|
package/es/DateInput2/index.js
CHANGED
@@ -162,8 +162,8 @@ const DateInput2 = ({
|
|
162
162
|
showPopover = _useState4[0],
|
163
163
|
setShowPopover = _useState4[1];
|
164
164
|
useEffect(() => {
|
165
|
-
// don't set input messages if there is an error set already
|
166
|
-
if (!inputMessages) {
|
165
|
+
// don't set input messages if there is an internal error set already
|
166
|
+
if (!inputMessages.length && !invalidDateErrorMessage) {
|
167
167
|
setInputMessages(messages || []);
|
168
168
|
}
|
169
169
|
}, [messages]);
|
package/lib/DateInput2/index.js
CHANGED
@@ -171,8 +171,8 @@ const DateInput2 = ({
|
|
171
171
|
showPopover = _useState4[0],
|
172
172
|
setShowPopover = _useState4[1];
|
173
173
|
(0, _react.useEffect)(() => {
|
174
|
-
// don't set input messages if there is an error set already
|
175
|
-
if (!inputMessages) {
|
174
|
+
// don't set input messages if there is an internal error set already
|
175
|
+
if (!inputMessages.length && !invalidDateErrorMessage) {
|
176
176
|
setInputMessages(messages || []);
|
177
177
|
}
|
178
178
|
}, [messages]);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@instructure/ui-date-input",
|
3
|
-
"version": "10.3.1-snapshot-
|
3
|
+
"version": "10.3.1-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.3.1-snapshot-
|
27
|
-
"@instructure/ui-babel-preset": "10.3.1-snapshot-
|
28
|
-
"@instructure/ui-buttons": "10.3.1-snapshot-
|
29
|
-
"@instructure/ui-scripts": "10.3.1-snapshot-
|
30
|
-
"@instructure/ui-test-utils": "10.3.1-snapshot-
|
26
|
+
"@instructure/ui-axe-check": "10.3.1-snapshot-7",
|
27
|
+
"@instructure/ui-babel-preset": "10.3.1-snapshot-7",
|
28
|
+
"@instructure/ui-buttons": "10.3.1-snapshot-7",
|
29
|
+
"@instructure/ui-scripts": "10.3.1-snapshot-7",
|
30
|
+
"@instructure/ui-test-utils": "10.3.1-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.3.1-snapshot-
|
39
|
-
"@instructure/shared-types": "10.3.1-snapshot-
|
40
|
-
"@instructure/ui-calendar": "10.3.1-snapshot-
|
41
|
-
"@instructure/ui-form-field": "10.3.1-snapshot-
|
42
|
-
"@instructure/ui-i18n": "10.3.1-snapshot-
|
43
|
-
"@instructure/ui-icons": "10.3.1-snapshot-
|
44
|
-
"@instructure/ui-popover": "10.3.1-snapshot-
|
45
|
-
"@instructure/ui-position": "10.3.1-snapshot-
|
46
|
-
"@instructure/ui-prop-types": "10.3.1-snapshot-
|
47
|
-
"@instructure/ui-react-utils": "10.3.1-snapshot-
|
48
|
-
"@instructure/ui-selectable": "10.3.1-snapshot-
|
49
|
-
"@instructure/ui-testable": "10.3.1-snapshot-
|
50
|
-
"@instructure/ui-text-input": "10.3.1-snapshot-
|
51
|
-
"@instructure/ui-utils": "10.3.1-snapshot-
|
38
|
+
"@instructure/emotion": "10.3.1-snapshot-7",
|
39
|
+
"@instructure/shared-types": "10.3.1-snapshot-7",
|
40
|
+
"@instructure/ui-calendar": "10.3.1-snapshot-7",
|
41
|
+
"@instructure/ui-form-field": "10.3.1-snapshot-7",
|
42
|
+
"@instructure/ui-i18n": "10.3.1-snapshot-7",
|
43
|
+
"@instructure/ui-icons": "10.3.1-snapshot-7",
|
44
|
+
"@instructure/ui-popover": "10.3.1-snapshot-7",
|
45
|
+
"@instructure/ui-position": "10.3.1-snapshot-7",
|
46
|
+
"@instructure/ui-prop-types": "10.3.1-snapshot-7",
|
47
|
+
"@instructure/ui-react-utils": "10.3.1-snapshot-7",
|
48
|
+
"@instructure/ui-selectable": "10.3.1-snapshot-7",
|
49
|
+
"@instructure/ui-testable": "10.3.1-snapshot-7",
|
50
|
+
"@instructure/ui-text-input": "10.3.1-snapshot-7",
|
51
|
+
"@instructure/ui-utils": "10.3.1-snapshot-7",
|
52
52
|
"moment-timezone": "^0.5.45",
|
53
53
|
"prop-types": "^15.8.1"
|
54
54
|
},
|
package/src/DateInput2/index.tsx
CHANGED
@@ -183,8 +183,8 @@ const DateInput2 = ({
|
|
183
183
|
const [showPopover, setShowPopover] = useState<boolean>(false)
|
184
184
|
|
185
185
|
useEffect(() => {
|
186
|
-
// don't set input messages if there is an error set already
|
187
|
-
if (!inputMessages) {
|
186
|
+
// don't set input messages if there is an internal error set already
|
187
|
+
if (!inputMessages.length && !invalidDateErrorMessage) {
|
188
188
|
setInputMessages(messages || [])
|
189
189
|
}
|
190
190
|
}, [messages])
|