mirror of
https://github.com/s00500/ESPUI.git
synced 2025-07-04 06:10:18 +00:00
Allow Max control to add maxlength to text input. Update docs.
This commit is contained in:
8
data/js/controls.js
vendored
8
data/js/controls.js
vendored
@ -441,7 +441,13 @@ function start() {
|
||||
if (data.parentControl) {
|
||||
var parent = $("#id" + data.parentControl + " input");
|
||||
if (parent.size()) {
|
||||
parent.attr("max", data.value);
|
||||
if(!parent.attr("type")) {
|
||||
//type is not set so therefore it is a text input
|
||||
parent.attr("maxlength", data.value);
|
||||
} else {
|
||||
//type might be range (slider) or number
|
||||
parent.attr("max", data.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user