This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { DatePicker } from "@mui/x-date-pickers";
|
||||
import { DateField } from "@mui/x-date-pickers";
|
||||
import { dateToTime, timeToDate } from "../../utils/DateUtils";
|
||||
import { TextFieldVariants } from "@mui/material";
|
||||
|
||||
@ -13,13 +13,16 @@ export function DateInput(p: {
|
||||
variant?: TextFieldVariants;
|
||||
}): React.ReactElement {
|
||||
return (
|
||||
<DatePicker
|
||||
<DateField
|
||||
autoFocus={p.autoFocus}
|
||||
readOnly={p.editable === false}
|
||||
label={p.label}
|
||||
slotProps={{
|
||||
field: { ref: p.ref },
|
||||
textField: { variant: p.variant ?? "standard", style: p.style },
|
||||
textField: {
|
||||
ref: p.ref,
|
||||
variant: p.variant ?? "standard",
|
||||
style: p.style,
|
||||
},
|
||||
}}
|
||||
value={timeToDate(p.value)}
|
||||
onChange={(v) => {
|
||||
|
Reference in New Issue
Block a user