Copy link to clipboard
Copied
Want to enter numbers only without letters?
++++++++++++++++++
setTimeout(function () {
textinputtitle.restrict = "0-9" + "Ù -Ù©";
dom_overlay_container.children["textinputtitle"].maxLength = 1;
what_change();
}, 0);
==================
if (!this.exectedOnce) {
function inputF(e) {
if (this.num == "invalid") {
document.getElementById("textinputtitle").value = document.getElementById("textinputtitle").value.slice(0, -1)
}
}
function keyupF(e) {
if (!isNaN(e.key)) {
this.num = e.key;
} else {
this.num = "invalid";
}
}
$("#dom_overlay_container").on("input", "#textinputtitle", inputF.bind(this));
$("#dom_overlay_container").on("keydown", "#textinputtitle", keyupF.bind(this));
this.executedOnce = true;
}
Copy link to clipboard
Copied
why do you persist in using a textinput component?
Copy link to clipboard
Copied
Because I want the user to enter a number only ??
Copy link to clipboard
Copied
??
Copy link to clipboard
Copied
??
setTimeout(function () {
var textinputtitle = /[^0-9]/g;
dom_overlay_container.children["textinputtitle"].maxLength = 1;
what_change();
}, 0);
Copy link to clipboard
Copied
if (!this.exectedOnce) {
function inputF(e) {
if (this.num == "invalid") {
document.getElementById("textinputtitle").value = document.getElementById("textinputtitle").value.slice(0, -1)
}
}
function keyupF(e) {
if (!isNaN(e.key)) {
this.num = e.key;
} else {
this.num = "invalid";
}
}
$("#dom_overlay_container").on("input", "#textinputtitle", inputF.bind(this));
$("#dom_overlay_container").on("keydown", "#textinputtitle", keyupF.bind(this));
this.executedOnce = true;
}
Copy link to clipboard
Copied
Thank you very much for your kind response (^_^) , genius ...
I wish you always happiness and ease in all your affairs .
Thanks .
Copy link to clipboard
Copied
you're welcome.