Improve rendering of read-only dates
Some checks reported errors
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed

This commit is contained in:
Pierre HUBERT 2023-08-26 16:39:39 +02:00
parent 581283f45b
commit 54ea680c5b

View File

@ -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>
); );
} }