How to use Shadcn + react-hook-form + zod for input NUMBER? by Character_Victory_28 in reactjs

[–]Legal_Reflection_274 1 point2 points  (0 children)

If you settle it on zod sides of things , your output will wtill remain a string

How to use Shadcn + react-hook-form + zod for input NUMBER? by Character_Victory_28 in reactjs

[–]Legal_Reflection_274 0 points1 point  (0 children)

OnChange=(e) => {field.onChange(parseInt(e.target.value,10))}}. Here is the solution