Skip to content

Commit 7354b0e

Browse files
committed
Jump to next field based on data-input custom attribute, not input type
1 parent 2dce2af commit 7354b0e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DateTimeInput.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ const getDetailValueFrom = (args) => getDetailValue(args, 0);
9393

9494
const getDetailValueTo = (args) => getDetailValue(args, 1);
9595

96-
function isValidInput(element) {
97-
return element.tagName === 'INPUT' && element.type === 'number';
96+
function isInternalInput(element) {
97+
return element.getAttribute('data-input') === 'true';
9898
}
9999

100100
function findInput(element, property) {
101101
let nextElement = element;
102102
do {
103103
nextElement = nextElement[property];
104-
} while (nextElement && !isValidInput(nextElement));
104+
} while (nextElement && !isInternalInput(nextElement));
105105
return nextElement;
106106
}
107107

0 commit comments

Comments
 (0)