Make remaining date inputs Safari-safe (uncontrolled)
Attendance filter, gradebook assignment date, and tuition entry date now use defaultValue (with a remount key where the field resets after submit). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@ function AttendancePage() {
|
||||
<SelectContent>{(classes ?? []).map((c) => <SelectItem key={c.id} value={c.id}>{c.name}</SelectItem>)}</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
<Input type="date" className="w-44" value={date} onChange={(e) => setDate(e.target.value)} />
|
||||
<Input type="date" className="w-44" defaultValue={date} onChange={(e) => setDate(e.target.value)} />
|
||||
</div>
|
||||
|
||||
{classId && (
|
||||
|
||||
@@ -734,7 +734,7 @@ function LedgerTab({ studentId, canEdit }: { studentId: string; canEdit: boolean
|
||||
<div className="grid grid-cols-5 gap-2">
|
||||
<select className="border rounded-md px-2 text-sm" value={form.kind} onChange={(e) => setForm({ ...form, kind: e.target.value })}><option value="charge">Charge</option><option value="payment">Payment</option></select>
|
||||
<select className="border rounded-md px-2 text-sm" value={form.category} onChange={(e) => setForm({ ...form, category: e.target.value })}><option value="tuition">Tuition</option><option value="late_pickup">Late pickup</option><option value="activity">Activity</option><option value="other">Other</option></select>
|
||||
<Input type="date" value={form.date} onChange={(e) => setForm({ ...form, date: e.target.value })} />
|
||||
<Input type="date" defaultValue={form.date} onChange={(e) => setForm({ ...form, date: e.target.value })} />
|
||||
<Input placeholder="Amount ($)" value={form.amount} onChange={(e) => setForm({ ...form, amount: e.target.value })} />
|
||||
<Input placeholder="Note" value={form.note} onChange={(e) => setForm({ ...form, note: e.target.value })} />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user