Improve rendering of read-only dates
This commit is contained in:
parent
581283f45b
commit
54ea680c5b
@ -1,6 +1,7 @@
|
|||||||
import { Stack, TextField, Typography } from "@mui/material";
|
import { Stack, TextField, Typography } from "@mui/material";
|
||||||
import { NumberConstraint, ServerApi } from "../../api/ServerApi";
|
import { NumberConstraint, ServerApi } from "../../api/ServerApi";
|
||||||
import { DateValue, fmtDate } from "../../api/MemberApi";
|
import { DateValue, fmtDate } from "../../api/MemberApi";
|
||||||
|
import { PropEdit } from "./PropEdit";
|
||||||
|
|
||||||
export function DateInput(p: {
|
export function DateInput(p: {
|
||||||
id: string;
|
id: string;
|
||||||
@ -13,13 +14,7 @@ export function DateInput(p: {
|
|||||||
if (!p.value) return <></>;
|
if (!p.value) return <></>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Typography
|
<PropEdit editable={false} label={p.label} value={fmtDate(p.value!)} />
|
||||||
variant="body2"
|
|
||||||
display="block"
|
|
||||||
style={{ marginBottom: "15px" }}
|
|
||||||
>
|
|
||||||
{p.label} : {fmtDate(p.value!)}
|
|
||||||
</Typography>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user