Skip to content

Commit 7d941d8

Browse files
committed
Use dataset interface instead of getAttribute
1 parent f9781a0 commit 7d941d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DateTimeInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const getDetailValueFrom = (args) => getDetailValue(args, 0);
9494
const getDetailValueTo = (args) => getDetailValue(args, 1);
9595

9696
function isInternalInput(element) {
97-
return element.getAttribute('data-input') === 'true';
97+
return element.dataset.input === 'true';
9898
}
9999

100100
function findInput(element, property) {

src/DateTimePicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default class DateTimePicker extends PureComponent {
131131
}
132132

133133
if (openWidgetsOnFocus) {
134-
if (event.target.getAttribute('data-select') === 'true') {
134+
if (event.target.dataset.select === 'true') {
135135
return;
136136
}
137137

0 commit comments

Comments
 (0)