Datalist element
Method of setting a list of options for a user to select in a text field, while leaving the ability to enter a custom value.
Spec | https://html.spec.whatwg.org/multipage/forms.html#the-datalist-element |
---|---|
Status | WHATWG Living Standard |
IE | Edge | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|---|
98 | |||||
95 (3,6) | 97 | ||||
94 (3,6) | 96 | TP | |||
11 (2) | 95 | 93 (3,6) | 95 | 15 | 80 |
10 (2) | 94 | 92 (3,6) | 94 | 14.1 | 79 |
9 | 93 | 91 (3,6) | 93 | 14 | 78 |
8 | 92 | 90 (3,6) | 92 | 13.1 | 77 |
Show all | |||||
7 | 91 | 89 (3,6) | 91 | 13 | 76 |
6 | 90 | 88 (3,6) | 90 | 12.1 | 75 |
5.5 | 89 | 87 (3,6) | 89 | 12 | 74 |
88 | 86 (3,6) | 88 | 11.1 | 73 | |
87 | 85 (3,6) | 87 | 11 | 72 | |
86 | 84 (3,6) | 86 | 10.1 | 71 | |
85 | 83 (3,6) | 85 | 10 | 70 | |
84 | 82 (3,6) | 84 | 9.1 | 69 | |
83 | 81 (3,6) | 83 | 9 | 68 | |
81 | 80 (3,6) | 81 | 8 | 67 | |
80 | 79 (3,6) | 80 | 7.1 | 66 | |
79 | 78 (3,6) | 79 | 7 | 65 | |
18 (2,4) | 77 (3,6) | 78 | 6.1 | 64 | |
17 (2,4) | 76 (3,6) | 77 | 6 | 63 (1) | |
16 (2,4) | 75 (3,6) | 76 | 5.1 | 62 (1) | |
15 (2) | 74 (3,6) | 75 | 5 | 60 (1) | |
14 (2) | 73 (3,6) | 74 | 4 | 58 (1) | |
13 (2) | 72 (3,6) | 73 | 3.2 | 57 (1) | |
12 (2) | 71 (3,6) | 72 | 3.1 | 56 (1) | |
70 (3,6) | 71 | 55 (1) | |||
69 (3,6) | 70 | 54 (1) | |||
68 (3,6) | 69 | 53 (1) | |||
67 (3,6) | 68 (1) | 52 (1) | |||
66 (3,6) | 67 (1) | 51 (1) | |||
65 (3,6) | 66 (1) | 50 (1) | |||
64 (3,6) | 65 (1) | 49 (1) | |||
63 (3,6) | 64 (1) | 48 (1) | |||
62 (3,6) | 63 (1) | 47 (1) | |||
61 (3,6) | 62 (1) | 46 (1) | |||
60 (3,6) | 61 (1) | 45 (1) | |||
59 (3,6) | 60 (1) | 44 (1) | |||
58 (3,6) | 59 (1) | 43 (1) | |||
57 (3,6) | 58 (1) | 42 (1) | |||
56 (3,6) | 57 (1) | 41 (1) | |||
55 (3,6) | 56 (1) | 40 (1) | |||
54 (3,6) | 55 (1) | 39 (1) | |||
53 (3,6) | 54 (1) | 38 (1) | |||
52 (3,6) | 53 (1) | 37 (1) | |||
51 (3,6) | 52 (1) | 36 (1) | |||
50 (3,6) | 51 (1) | 35 (1) | |||
49 (3,6) | 50 (1) | 34 (1) | |||
48 (3,6) | 49 (1) | 33 (1) | |||
47 (3,6) | 48 (1) | 32 (1) | |||
46 (3,6) | 47 (1) | 31 (1) | |||
45 (3,6) | 46 (1) | 30 (1) | |||
44 (3,6) | 45 (1) | 29 (1) | |||
43 (3,6) | 44 (1) | 28 (1) | |||
42 (3,6) | 43 (1) | 27 (1) | |||
41 (3,6) | 42 (1) | 26 (1) | |||
40 (3,6) | 41 (1) | 25 (1) | |||
39 (3,6) | 40 (1) | 24 (1) | |||
38 (3,6) | 39 (1) | 23 (1) | |||
37 (3,6) | 38 (1) | 22 (1) | |||
36 (3,6) | 37 (1) | 21 (1) | |||
35 (3,6) | 36 (1) | 20 (1) | |||
34 (3,6) | 35 (1) | 19 (1) | |||
33 (3,6) | 34 (1) | 18 (1) | |||
32 (3,6) | 33 (1) | 17 (1) | |||
31 (3,6) | 32 (1) | 16 (1) | |||
30 (3,6) | 31 (1) | 15 (1) | |||
29 (3,6) | 30 (1) | 12.1 | |||
28 (3,6) | 29 (1) | 12 | |||
27 (3,6) | 28 (1) | 11.6 | |||
26 (3,6) | 27 (1) | 11.5 | |||
25 (3,6) | 26 (1) | 11.1 | |||
24 (3,6) | 25 (1) | 11 | |||
23 (3,6) | 24 (1) | 10.6 | |||
22 (3,6) | 23 (1) | 10.5 | |||
21 (3,6) | 22 (1) | 10.0-10.1 | |||
20 (3,6) | 21 (1) | 9.5-9.6 | |||
19 (3,6) | 20 (1) | 9 | |||
18 (3,6) | 19 | ||||
17 (3,6) | 18 | ||||
16 (3,6) | 17 | ||||
15 (3,6) | 16 | ||||
14 (3,6) | 15 | ||||
13 (3,6) | 14 | ||||
12 (3,6) | 13 | ||||
11 (3,6) | 12 | ||||
10 (3,6) | 11 | ||||
9 (3,6) | 10 | ||||
8 (3,6) | 9 | ||||
7 (3,6) | 8 | ||||
6 (3,6) | 7 | ||||
5 (3,6) | 6 | ||||
4 (3,6) | 5 | ||||
3.6 | 4 | ||||
3.5 | |||||
3 | |||||
2 |
Safari on iOS | Opera Mini | Android Browser | Blackberry Browser | Opera Mobile | Android Chrome | Android Firefox | IE Mobile | Android UC Browser | Samsung Internet | QQ Browser | Baidu Browser | KaiOS Browser |
---|---|---|---|---|---|---|---|---|---|---|---|---|
15 (5) | all | 94 | 10 | 64 | 94 | 92 (3) | 11 | 12.12 | 15.0 | 10.4 (1) | 7.12 | 2.5 |
14.5-14.8 (5) | 4.4.3-4.4.4 | 7 | 12.1 | 10 | 14.0 | |||||||
14.0-14.4 (5) | 4.4 | 12 | 13.0 | |||||||||
13.4-13.7 (5) | 4.2-4.3 | 11.5 | 12.0 | |||||||||
Show all | ||||||||||||
13.3 (5) | 4.1 | 11.1 | 11.1-11.2 | |||||||||
13.2 (5) | 4 | 11 | 10.1 | |||||||||
13.0-13.1 (5) | 3 | 10 | 9.2 | |||||||||
12.2-12.5 (5) | 2.3 | 8.2 | ||||||||||
12.0-12.1 | 2.2 | 7.2-7.4 | ||||||||||
11.3-11.4 | 2.1 | 6.2-6.4 | ||||||||||
11.0-11.2 | 5.0-5.4 | |||||||||||
10.3 | 4 | |||||||||||
10.0-10.2 | ||||||||||||
9.3 | ||||||||||||
9.0-9.2 | ||||||||||||
8.1-8.4 | ||||||||||||
8 | ||||||||||||
7.0-7.1 | ||||||||||||
6.0-6.1 | ||||||||||||
5.0-5.1 | ||||||||||||
4.2-4.3 | ||||||||||||
4.0-4.1 | ||||||||||||
3.2 |
Notes
While most commonly used on text fields, datalists can also be used on other input types. IE11 supports the element on range
fields. Chrome and Opera also support datalists to suggest given values on range
, color
and date/time fields.
Partial support refers to a bug where long lists of items are unscrollable resulting in unselectable options.
Partial support in IE refers to significantly buggy behavior (IE11+ does send the input and change events upon selection).
Partial support refers to no support for datalists on non-text fields (e.g. number, range, color).
Partial support in Edge refers to disappearing option elements on focusing the input element via tab.
Supported through WKWebView and Safari but not through UIWebView
In Firefox, autocomplete must be set to off to make dynamic datalist work due to a bug
Bugs
In UIWebView Apps in iOS 12.2, using the datalist element may cause the input type to become incapable of being able to type in it despite not supporting it.
Resources
- Mozilla Hacks article
- HTML5 Library including datalist support
- MDN Web Docs - datalist
- WebPlatform Docs
- Eiji Kitamura's options demos & tests
- Minimal Datalist polyfill w/tutorial
- Minimal and library dependency-free vanilla JavaScript polyfill
Data by caniuse.com
Licensed under the Creative Commons Attribution License v4.0.
https://caniuse.com/datalist