Handle negative amount input
This commit is contained in:
@ -2,6 +2,7 @@ import { DatePicker } from "@mui/x-date-pickers";
|
||||
import { dateToTime, timeToDate } from "../../utils/DateUtils";
|
||||
|
||||
export function DateInput(p: {
|
||||
ref?: React.Ref<HTMLInputElement>;
|
||||
editable?: boolean;
|
||||
autoFocus?: boolean;
|
||||
label?: string;
|
||||
@ -14,7 +15,10 @@ export function DateInput(p: {
|
||||
autoFocus={p.autoFocus}
|
||||
readOnly={p.editable === false}
|
||||
label={p.label}
|
||||
slotProps={{ textField: { variant: "standard", style: p.style } }}
|
||||
slotProps={{
|
||||
field: { ref: p.ref },
|
||||
textField: { variant: "standard", style: p.style },
|
||||
}}
|
||||
value={timeToDate(p.value)}
|
||||
onChange={(v) => {
|
||||
try {
|
||||
|
Reference in New Issue
Block a user