Skip to content

Commit 4ed7ad0

Browse files
author
bndct-devops
committed
fix: accept comma as decimal separator in bodyweight input
1 parent c614a55 commit 4ed7ad0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frontend/src/App.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ export default function App() {
913913
<p className="section-heading">Body Weight</p>
914914
<form onSubmit={async e => {
915915
e.preventDefault()
916-
const n = parseFloat(bwInput)
916+
const n = parseFloat(bwInput.replace(',', '.'))
917917
if (isNaN(n) || n <= 0) return
918918
setBwSaving(true)
919919
const kg = activeProfile.unit === 'lbs' ? Math.round(n / 2.20462 * 100) / 100 : n
@@ -924,7 +924,7 @@ export default function App() {
924924
setBwSaving(false)
925925
}} style={{ display: 'flex', gap: 8, marginBottom: 14 }}>
926926
<input
927-
type="number" inputMode="decimal" step="0.1" min="20" max="500"
927+
type="text" inputMode="decimal"
928928
placeholder={`Today's weight (${activeProfile.unit})`}
929929
value={bwInput}
930930
onChange={e => setBwInput(e.target.value)}

0 commit comments

Comments
 (0)