From ac76d02cb6117772c53f8df4a5a12c4d8420b1c2 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Fri, 13 Mar 2026 14:56:35 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20validazione=20input:=20allinea=20min=20co?= =?UTF-8?q?n=20step=20per=20sub-unit=C3=A0=20(50g=20ora=20funziona)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/app.js | 2 ++ index.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/app.js b/assets/js/app.js index aa36c35..c407e9b 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -3038,6 +3038,7 @@ function switchUseUnit(mode) { const step = getSubUnitStep(_useConfMode.packageUnit); qtyInput.value = step; qtyInput.step = step; + qtyInput.min = step; hint.textContent = `Quantità in ${_useConfMode.subLabel} (totale: ${Math.round(_useConfMode.totalSub)}${_useConfMode.subLabel})`; } else { confBtn.classList.add('active'); @@ -3045,6 +3046,7 @@ function switchUseUnit(mode) { _useConfMode._activeUnit = 'conf'; qtyInput.value = 1; qtyInput.step = 0.5; + qtyInput.min = 0.5; hint.textContent = `Confezioni da ${_useConfMode.packageSize}${_useConfMode.subLabel} (hai ${_useConfMode.totalConf.toFixed(1)} conf)`; } } diff --git a/index.html b/index.html index 65651b1..1f9ee6e 100644 --- a/index.html +++ b/index.html @@ -878,6 +878,6 @@ - +