@instructure/ui-date-time-input 8.38.2-snapshot-4 → 8.38.2-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,7 +3,7 @@
|
|
|
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.38.2-snapshot-
|
|
6
|
+
## [8.38.2-snapshot-6](https://github.com/instructure/instructure-ui/compare/v8.38.1...v8.38.2-snapshot-6) (2023-07-17)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-date-time-input
|
|
9
9
|
|
|
@@ -34,10 +34,6 @@ import { TimeSelectLocator } from '@instructure/ui-time-select/es/TimeSelect/Tim
|
|
|
34
34
|
|
|
35
35
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
36
36
|
export const DateTimeInputLocator = locator(DateTimeInput.selector, {
|
|
37
|
-
findDateInput:
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
findTimeInput: function () {
|
|
41
|
-
return TimeSelectLocator.find(...arguments);
|
|
42
|
-
}
|
|
37
|
+
findDateInput: (...args) => DateInputLocator.find(...args),
|
|
38
|
+
findTimeInput: (...args) => TimeSelectLocator.find(...args)
|
|
43
39
|
});
|
|
@@ -62,8 +62,9 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
// date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
|
|
65
|
-
this.handleDayClick = (event,
|
|
66
|
-
|
|
65
|
+
this.handleDayClick = (event, {
|
|
66
|
+
date
|
|
67
|
+
}) => {
|
|
67
68
|
const dateParsed = DateTime.parse(date, this.locale(), this.timezone());
|
|
68
69
|
this.updateStateBasedOnDateInput(dateParsed, event);
|
|
69
70
|
};
|
|
@@ -204,9 +205,7 @@ let DateTimeInput = (_dec = testable(), _dec(_class = (_class2 = class DateTimeI
|
|
|
204
205
|
});
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
|
-
recalculateState(dateStr) {
|
|
208
|
-
let doNotChangeDate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
209
|
-
let doNotChangeTime = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
208
|
+
recalculateState(dateStr, doNotChangeDate = false, doNotChangeTime = false) {
|
|
210
209
|
let errorMsg;
|
|
211
210
|
if (dateStr) {
|
|
212
211
|
const parsed = DateTime.parse(dateStr, this.locale(), this.timezone());
|
|
@@ -41,11 +41,7 @@ var _TimeSelectLocator = require("@instructure/ui-time-select/lib/TimeSelect/Tim
|
|
|
41
41
|
|
|
42
42
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
43
43
|
const DateTimeInputLocator = (0, _locator.locator)(_index.DateTimeInput.selector, {
|
|
44
|
-
findDateInput:
|
|
45
|
-
|
|
46
|
-
},
|
|
47
|
-
findTimeInput: function () {
|
|
48
|
-
return _TimeSelectLocator.TimeSelectLocator.find(...arguments);
|
|
49
|
-
}
|
|
44
|
+
findDateInput: (...args) => _DateInputLocator.DateInputLocator.find(...args),
|
|
45
|
+
findTimeInput: (...args) => _TimeSelectLocator.TimeSelectLocator.find(...args)
|
|
50
46
|
});
|
|
51
47
|
exports.DateTimeInputLocator = DateTimeInputLocator;
|
|
@@ -70,8 +70,9 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
|
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
72
|
// date is returned es a ISO string, like 2021-09-14T22:00:00.000Z
|
|
73
|
-
this.handleDayClick = (event,
|
|
74
|
-
|
|
73
|
+
this.handleDayClick = (event, {
|
|
74
|
+
date
|
|
75
|
+
}) => {
|
|
75
76
|
const dateParsed = _DateTime.DateTime.parse(date, this.locale(), this.timezone());
|
|
76
77
|
this.updateStateBasedOnDateInput(dateParsed, event);
|
|
77
78
|
};
|
|
@@ -212,9 +213,7 @@ let DateTimeInput = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
|
|
|
212
213
|
});
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
|
-
recalculateState(dateStr) {
|
|
216
|
-
let doNotChangeDate = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
217
|
-
let doNotChangeTime = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
216
|
+
recalculateState(dateStr, doNotChangeDate = false, doNotChangeTime = false) {
|
|
218
217
|
let errorMsg;
|
|
219
218
|
if (dateStr) {
|
|
220
219
|
const parsed = _DateTime.DateTime.parse(dateStr, this.locale(), this.timezone());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-time-input",
|
|
3
|
-
"version": "8.38.2-snapshot-
|
|
3
|
+
"version": "8.38.2-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.38.2-snapshot-
|
|
27
|
-
"@instructure/ui-test-locator": "8.38.2-snapshot-
|
|
28
|
-
"@instructure/ui-test-utils": "8.38.2-snapshot-
|
|
26
|
+
"@instructure/ui-babel-preset": "8.38.2-snapshot-6",
|
|
27
|
+
"@instructure/ui-test-locator": "8.38.2-snapshot-6",
|
|
28
|
+
"@instructure/ui-test-utils": "8.38.2-snapshot-6"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@babel/runtime": "^7.22.
|
|
32
|
-
"@instructure/debounce": "8.38.2-snapshot-
|
|
33
|
-
"@instructure/emotion": "8.38.2-snapshot-
|
|
34
|
-
"@instructure/ui-a11y-content": "8.38.2-snapshot-
|
|
35
|
-
"@instructure/ui-buttons": "8.38.2-snapshot-
|
|
36
|
-
"@instructure/ui-calendar": "8.38.2-snapshot-
|
|
37
|
-
"@instructure/ui-date-input": "8.38.2-snapshot-
|
|
38
|
-
"@instructure/ui-form-field": "8.38.2-snapshot-
|
|
39
|
-
"@instructure/ui-i18n": "8.38.2-snapshot-
|
|
40
|
-
"@instructure/ui-icons": "8.38.2-snapshot-
|
|
41
|
-
"@instructure/ui-prop-types": "8.38.2-snapshot-
|
|
42
|
-
"@instructure/ui-react-utils": "8.38.2-snapshot-
|
|
43
|
-
"@instructure/ui-testable": "8.38.2-snapshot-
|
|
44
|
-
"@instructure/ui-time-select": "8.38.2-snapshot-
|
|
45
|
-
"@instructure/ui-utils": "8.38.2-snapshot-
|
|
31
|
+
"@babel/runtime": "^7.22.6",
|
|
32
|
+
"@instructure/debounce": "8.38.2-snapshot-6",
|
|
33
|
+
"@instructure/emotion": "8.38.2-snapshot-6",
|
|
34
|
+
"@instructure/ui-a11y-content": "8.38.2-snapshot-6",
|
|
35
|
+
"@instructure/ui-buttons": "8.38.2-snapshot-6",
|
|
36
|
+
"@instructure/ui-calendar": "8.38.2-snapshot-6",
|
|
37
|
+
"@instructure/ui-date-input": "8.38.2-snapshot-6",
|
|
38
|
+
"@instructure/ui-form-field": "8.38.2-snapshot-6",
|
|
39
|
+
"@instructure/ui-i18n": "8.38.2-snapshot-6",
|
|
40
|
+
"@instructure/ui-icons": "8.38.2-snapshot-6",
|
|
41
|
+
"@instructure/ui-prop-types": "8.38.2-snapshot-6",
|
|
42
|
+
"@instructure/ui-react-utils": "8.38.2-snapshot-6",
|
|
43
|
+
"@instructure/ui-testable": "8.38.2-snapshot-6",
|
|
44
|
+
"@instructure/ui-time-select": "8.38.2-snapshot-6",
|
|
45
|
+
"@instructure/ui-utils": "8.38.2-snapshot-6",
|
|
46
46
|
"prop-types": "^15.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|