@instructure/ui-date-input 10.3.1-snapshot-3 → 10.3.1-snapshot-5

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 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-3](https://github.com/instructure/instructure-ui/compare/v10.3.0...v10.3.1-snapshot-3) (2024-10-09)
6
+ ## [10.3.1-snapshot-5](https://github.com/instructure/instructure-ui/compare/v10.3.0...v10.3.1-snapshot-5) (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
 
@@ -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]);
@@ -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",
3
+ "version": "10.3.1-snapshot-5",
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-3",
27
- "@instructure/ui-babel-preset": "10.3.1-snapshot-3",
28
- "@instructure/ui-buttons": "10.3.1-snapshot-3",
29
- "@instructure/ui-scripts": "10.3.1-snapshot-3",
30
- "@instructure/ui-test-utils": "10.3.1-snapshot-3",
26
+ "@instructure/ui-axe-check": "10.3.1-snapshot-5",
27
+ "@instructure/ui-babel-preset": "10.3.1-snapshot-5",
28
+ "@instructure/ui-buttons": "10.3.1-snapshot-5",
29
+ "@instructure/ui-scripts": "10.3.1-snapshot-5",
30
+ "@instructure/ui-test-utils": "10.3.1-snapshot-5",
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-3",
39
- "@instructure/shared-types": "10.3.1-snapshot-3",
40
- "@instructure/ui-calendar": "10.3.1-snapshot-3",
41
- "@instructure/ui-form-field": "10.3.1-snapshot-3",
42
- "@instructure/ui-i18n": "10.3.1-snapshot-3",
43
- "@instructure/ui-icons": "10.3.1-snapshot-3",
44
- "@instructure/ui-popover": "10.3.1-snapshot-3",
45
- "@instructure/ui-position": "10.3.1-snapshot-3",
46
- "@instructure/ui-prop-types": "10.3.1-snapshot-3",
47
- "@instructure/ui-react-utils": "10.3.1-snapshot-3",
48
- "@instructure/ui-selectable": "10.3.1-snapshot-3",
49
- "@instructure/ui-testable": "10.3.1-snapshot-3",
50
- "@instructure/ui-text-input": "10.3.1-snapshot-3",
51
- "@instructure/ui-utils": "10.3.1-snapshot-3",
38
+ "@instructure/emotion": "10.3.1-snapshot-5",
39
+ "@instructure/shared-types": "10.3.1-snapshot-5",
40
+ "@instructure/ui-calendar": "10.3.1-snapshot-5",
41
+ "@instructure/ui-form-field": "10.3.1-snapshot-5",
42
+ "@instructure/ui-i18n": "10.3.1-snapshot-5",
43
+ "@instructure/ui-icons": "10.3.1-snapshot-5",
44
+ "@instructure/ui-popover": "10.3.1-snapshot-5",
45
+ "@instructure/ui-position": "10.3.1-snapshot-5",
46
+ "@instructure/ui-prop-types": "10.3.1-snapshot-5",
47
+ "@instructure/ui-react-utils": "10.3.1-snapshot-5",
48
+ "@instructure/ui-selectable": "10.3.1-snapshot-5",
49
+ "@instructure/ui-testable": "10.3.1-snapshot-5",
50
+ "@instructure/ui-text-input": "10.3.1-snapshot-5",
51
+ "@instructure/ui-utils": "10.3.1-snapshot-5",
52
52
  "moment-timezone": "^0.5.45",
53
53
  "prop-types": "^15.8.1"
54
54
  },
@@ -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])