Compare commits
3 Commits
601a24473d
...
df7600f959
| Author | SHA1 | Date | |
|---|---|---|---|
| df7600f959 | |||
| b5dc78a8e1 | |||
| cf7ad598db |
@@ -176,6 +176,9 @@ export class Member implements MemberDataApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function fmtDate(d?: DateValue): string {
|
export function fmtDate(d?: DateValue): string {
|
||||||
|
if (d?.year && !d.month && !d.day)
|
||||||
|
return d?.year?.toString().padStart(4, "0");
|
||||||
|
|
||||||
return `${d?.day?.toString().padStart(2, "0") ?? "__"}/${
|
return `${d?.day?.toString().padStart(2, "0") ?? "__"}/${
|
||||||
d?.month?.toString().padStart(2, "0") ?? "__"
|
d?.month?.toString().padStart(2, "0") ?? "__"
|
||||||
}/${d?.year?.toString().padStart(4, "0") ?? "__"}`;
|
}/${d?.year?.toString().padStart(4, "0") ?? "__"}`;
|
||||||
|
|||||||
@@ -65,11 +65,13 @@ export function MemberInput(p: {
|
|||||||
}}
|
}}
|
||||||
options={choices}
|
options={choices}
|
||||||
sx={{ width: "100%" }}
|
sx={{ width: "100%" }}
|
||||||
filterOptions={(options, state) =>
|
filterOptions={(options, state) => {
|
||||||
options.filter((m) =>
|
const res = options.filter((m) =>
|
||||||
m?.fullName.toLowerCase().includes(state.inputValue)
|
m?.fullName.toLowerCase().includes(state.inputValue)
|
||||||
)
|
);
|
||||||
}
|
res.length = Math.min(20, res.length);
|
||||||
|
return res;
|
||||||
|
}}
|
||||||
getOptionLabel={(o) => o?.fullName ?? ""}
|
getOptionLabel={(o) => o?.fullName ?? ""}
|
||||||
renderInput={(params) => <TextField {...params} label={p.label} />}
|
renderInput={(params) => <TextField {...params} label={p.label} />}
|
||||||
renderOption={(_props, option, _state) => (
|
renderOption={(_props, option, _state) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user