Add saving time form submit by hitting on Enter

parent 4eee590d
......@@ -236,6 +236,20 @@ document.querySelector("#ProductTime").onpaste = function() {
validate(event);
};
document.querySelector("#realworktime").addEventListener("keypress", function(event) {
if (event.key === "Enter") {
this.blur();
document.querySelector("#ProductTime").focus();
}
})
document.querySelector("#ProductTime").addEventListener("keypress", function(event) {
if (event.key === "Enter") {
this.blur();
document.querySelector("#saveTime").click();
}
})
//////////////////////////////////////////////////////////////
if (typeof window.addEventListener != "undefined") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment