diff --git a/components/modules/Kue705FO.tsx b/components/modules/Kue705FO.tsx index a033591..eed4a55 100644 --- a/components/modules/Kue705FO.tsx +++ b/components/modules/Kue705FO.tsx @@ -285,13 +285,13 @@ const Kue705FO: React.FC = ({ console.error("Canvas mit ID 'myChart' nicht gefunden."); return; } - + const ctx = canvas.getContext("2d"); if (!ctx) { console.error("2D-Kontext für Canvas konnte nicht erstellt werden."); return; } - + // Konvertiere Zeitstempel in ein lesbares Format für die X-Achse const labels = data.map((row) => { const date = new Date(String(row.t).replace(/-/g, "/")); // Zeitstring parsen @@ -301,7 +301,7 @@ const Kue705FO: React.FC = ({ second: "2-digit", }); }); - + new Chart(ctx, { type: "line", data: { @@ -368,7 +368,6 @@ const Kue705FO: React.FC = ({ }, }); }; - useEffect(() => { const updateAlarmStatus = () => { @@ -388,7 +387,7 @@ const Kue705FO: React.FC = ({ useEffect(() => { if (reduxKueVersion?.[slotIndex]) { - setKueVersion("V" + reduxKueVersion[slotIndex] / 100); + setKueVersion("V" + Number(reduxKueVersion[slotIndex]) / 100); } }, [slotIndex, reduxKueVersion]); //--------------------------------------------------- @@ -474,6 +473,11 @@ const Kue705FO: React.FC = ({ } }, [schleifenwiderstand, activeButton]); //--------------------------------------------------- + const noLetter = (e: React.KeyboardEvent) => { + const input = e.currentTarget; + input.value = input.value.replace(/[^0-9]/g, ""); + }; + return (
{" "} {/* Bootstrap Icon "X" */} -

Messkurve Slot {slotIndex + 1}

+ noLetter(e)} + /> +
    +
  • +
    + Jahr + noLetter(this)} + /> +
    +
  • + +
  • +
    + Monat + +
    +
  • + +
  • +
    + +
    +
  • +
  • + +
  • + +
  • + +
  • +