fix many bugs

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-30 19:03:31 +03:00
co-authored by Copilot
parent 0c43c8edd2
commit e1ef6fa2ea
24 changed files with 333 additions and 82 deletions
@@ -5,6 +5,7 @@ export type TextInputFieldProps = BaseFieldControlProps<string> & {
placeholder?: string
type?: React.HTMLInputTypeAttribute
step?: React.InputHTMLAttributes<HTMLInputElement>["step"]
formatter?: (value: string) => string
}
export function TextInputField({
@@ -17,11 +18,12 @@ export function TextInputField({
placeholder,
type = "text",
step,
formatter,
}: TextInputFieldProps) {
return (
<Input
value={value}
onChange={(e) => onChange(e.target.value)}
onChange={(e) => onChange(formatter ? formatter(e.target.value) : e.target.value)}
onBlur={onBlur}
name={name}
disabled={disabled}
@@ -38,7 +38,7 @@ export function TimePickerField({
disabled,
invalid,
placeholder = "Pick a time",
withSeconds = true,
withSeconds = false,
}: TimePickerFieldProps) {
const { hours, minutes, seconds } = parseTime(value ?? "")
const hasValue = !!value