-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (41 loc) · 982 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html
lang="en"
dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Date Input Native Demo</title>
<style>
input {
display: block;
margin: 0.6rem 0;
}
label {
display: block;
margin-bottom: 1.2rem;
}
</style>
</head>
<body>
<label>
Input Format TT.MM.JJJJ
<input type="text" />
</label>
<label>
Input Filled
<input
value="11.08.1984"
type="text" />
</label>
<script type="module">
import { useDateInput } from '../../index-refactoring.js';
const {
handleInput,
} = useDateInput();
document.querySelectorAll('input').forEach((selector) => selector.addEventListener('input', (e) => {
e.target.value = handleInput(e.target.value);
}));
</script>
</body>
</html>