@instructure/ui-date-time-input 8.37.1-snapshot-4 → 8.37.1-snapshot-6
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,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
|
-
## [8.37.1-snapshot-
|
|
6
|
+
## [8.37.1-snapshot-6](https://github.com/instructure/instructure-ui/compare/v8.37.0...v8.37.1-snapshot-6) (2023-05-10)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-date-time-input:** fix onChange event not firing sometimes ([4eaf63c](https://github.com/instructure/instructure-ui/commit/4eaf63c2f9babe167c18c4dacfdaa2230942b1d6))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -110,11 +110,11 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
110
110
|
type: 'error'
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
this.setState(newState);
|
|
114
113
|
if (this.areDifferentDates(this.state.iso, newState.iso)) {
|
|
115
114
|
var _this$props$onChange, _this$props, _newState$iso;
|
|
116
115
|
(_this$props$onChange = (_this$props = this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, (_newState$iso = newState.iso) === null || _newState$iso === void 0 ? void 0 : _newState$iso.toISOString());
|
|
117
116
|
}
|
|
117
|
+
this.setState(newState);
|
|
118
118
|
};
|
|
119
119
|
this.areDifferentDates = (d1, d2) => {
|
|
120
120
|
if (!d1 && !d2) {
|
|
@@ -118,11 +118,11 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
|
|
|
118
118
|
type: 'error'
|
|
119
119
|
};
|
|
120
120
|
}
|
|
121
|
-
this.setState(newState);
|
|
122
121
|
if (this.areDifferentDates(this.state.iso, newState.iso)) {
|
|
123
122
|
var _this$props$onChange, _this$props, _newState$iso;
|
|
124
123
|
(_this$props$onChange = (_this$props = this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, (_newState$iso = newState.iso) === null || _newState$iso === void 0 ? void 0 : _newState$iso.toISOString());
|
|
125
124
|
}
|
|
125
|
+
this.setState(newState);
|
|
126
126
|
};
|
|
127
127
|
this.areDifferentDates = (d1, d2) => {
|
|
128
128
|
if (!d1 && !d2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-time-input",
|
|
3
|
-
"version": "8.37.1-snapshot-
|
|
3
|
+
"version": "8.37.1-snapshot-6",
|
|
4
4
|
"description": "A UI component that allows to select date and time.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.37.1-snapshot-
|
|
27
|
-
"@instructure/ui-test-locator": "8.37.1-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "8.37.1-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.37.1-snapshot-6",
|
|
27
|
+
"@instructure/ui-test-locator": "8.37.1-snapshot-6",
|
|
28
|
+
"@instructure/ui-test-utils": "8.37.1-snapshot-6"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.21.0",
|
|
32
|
-
"@instructure/debounce": "8.37.1-snapshot-
|
|
33
|
-
"@instructure/emotion": "8.37.1-snapshot-
|
|
34
|
-
"@instructure/ui-a11y-content": "8.37.1-snapshot-
|
|
35
|
-
"@instructure/ui-buttons": "8.37.1-snapshot-
|
|
36
|
-
"@instructure/ui-calendar": "8.37.1-snapshot-
|
|
37
|
-
"@instructure/ui-date-input": "8.37.1-snapshot-
|
|
38
|
-
"@instructure/ui-form-field": "8.37.1-snapshot-
|
|
39
|
-
"@instructure/ui-i18n": "8.37.1-snapshot-
|
|
40
|
-
"@instructure/ui-icons": "8.37.1-snapshot-
|
|
41
|
-
"@instructure/ui-prop-types": "8.37.1-snapshot-
|
|
42
|
-
"@instructure/ui-react-utils": "8.37.1-snapshot-
|
|
43
|
-
"@instructure/ui-testable": "8.37.1-snapshot-
|
|
44
|
-
"@instructure/ui-time-select": "8.37.1-snapshot-
|
|
45
|
-
"@instructure/ui-utils": "8.37.1-snapshot-
|
|
32
|
+
"@instructure/debounce": "8.37.1-snapshot-6",
|
|
33
|
+
"@instructure/emotion": "8.37.1-snapshot-6",
|
|
34
|
+
"@instructure/ui-a11y-content": "8.37.1-snapshot-6",
|
|
35
|
+
"@instructure/ui-buttons": "8.37.1-snapshot-6",
|
|
36
|
+
"@instructure/ui-calendar": "8.37.1-snapshot-6",
|
|
37
|
+
"@instructure/ui-date-input": "8.37.1-snapshot-6",
|
|
38
|
+
"@instructure/ui-form-field": "8.37.1-snapshot-6",
|
|
39
|
+
"@instructure/ui-i18n": "8.37.1-snapshot-6",
|
|
40
|
+
"@instructure/ui-icons": "8.37.1-snapshot-6",
|
|
41
|
+
"@instructure/ui-prop-types": "8.37.1-snapshot-6",
|
|
42
|
+
"@instructure/ui-react-utils": "8.37.1-snapshot-6",
|
|
43
|
+
"@instructure/ui-testable": "8.37.1-snapshot-6",
|
|
44
|
+
"@instructure/ui-time-select": "8.37.1-snapshot-6",
|
|
45
|
+
"@instructure/ui-utils": "8.37.1-snapshot-6",
|
|
46
46
|
"prop-types": "^15.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
@@ -321,10 +321,10 @@ class DateTimeInput extends Component<DateTimeInputProps, DateTimeInputState> {
|
|
|
321
321
|
// eslint-disable-next-line no-param-reassign
|
|
322
322
|
newState.message = { text: text, type: 'error' }
|
|
323
323
|
}
|
|
324
|
-
this.setState(newState)
|
|
325
324
|
if (this.areDifferentDates(this.state.iso, newState.iso)) {
|
|
326
325
|
this.props.onChange?.(e, newState.iso?.toISOString())
|
|
327
326
|
}
|
|
327
|
+
this.setState(newState)
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
areDifferentDates = (d1?: Moment, d2?: Moment) => {
|