|
91 | 91 | URL = "url" |
92 | 92 | DATE = "date" |
93 | 93 | TIME = "time" |
| 94 | +COLOR = "color" |
94 | 95 |
|
95 | 96 | CHECKBOX = 'checkbox' |
96 | 97 | RADIO = 'radio' |
@@ -133,7 +134,7 @@ def input(label='', type=TEXT, *, validate=None, name=None, value=None, action=N |
133 | 134 | r"""Text input |
134 | 135 |
|
135 | 136 | :param str label: Label of input field. |
136 | | - :param str type: Input type. Currently supported types are:`TEXT` , `NUMBER` , `FLOAT` , `PASSWORD` , `URL` , `DATE` , `TIME` |
| 137 | + :param str type: Input type. Currently, supported types are:`TEXT` , `NUMBER` , `FLOAT` , `PASSWORD` , `URL` , `DATE` , `TIME`, `COLOR` |
137 | 138 |
|
138 | 139 | Note that `DATE` and `TIME` type are not supported on some browsers, |
139 | 140 | for details see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Browser_compatibility |
@@ -222,7 +223,7 @@ def select_date(set_value): |
222 | 223 | item_spec, valid_func, onchange_func = _parse_args(locals(), excludes=('action',)) |
223 | 224 |
|
224 | 225 | # check input type |
225 | | - allowed_type = {TEXT, NUMBER, FLOAT, PASSWORD, URL, DATE, TIME} |
| 226 | + allowed_type = {TEXT, NUMBER, FLOAT, PASSWORD, URL, DATE, TIME, COLOR} |
226 | 227 | assert type in allowed_type, 'Input type not allowed.' |
227 | 228 |
|
228 | 229 | value_setter = None |
|
0 commit comments