Skip to content

Commit d6e050a

Browse files
committed
Use dataset interface instead of getAttribute
1 parent 51581f6 commit d6e050a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/TimeInput.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function hoursAreDifferent(date1, date2) {
3232
}
3333

3434
function isInternalInput(element) {
35-
return element.getAttribute('data-input') === 'true';
35+
return element.dataset.input === 'true';
3636
}
3737

3838
function findInput(element, property) {

src/TimePicker.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default class TimePicker extends PureComponent {
9696
}
9797

9898
if (openClockOnFocus) {
99-
if (event.target.getAttribute('data-select') === 'true') {
99+
if (event.target.dataset.select === 'true') {
100100
return;
101101
}
102102

0 commit comments

Comments
 (0)