Do not display full dates if day and month are unknown

This commit is contained in:
Pierre HUBERT 2023-08-26 08:04:02 +02:00
parent cf7ad598db
commit b5dc78a8e1
2 changed files with 4 additions and 1 deletions

View File

@ -176,6 +176,9 @@ export class Member implements MemberDataApi {
}
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") ?? "__"}/${
d?.month?.toString().padStart(2, "0") ?? "__"
}/${d?.year?.toString().padStart(4, "0") ?? "__"}`;

View File

@ -69,7 +69,7 @@ export function MemberInput(p: {
const res = options.filter((m) =>
m?.fullName.toLowerCase().includes(state.inputValue)
);
res.length = Math.min(15, res.length);
res.length = Math.min(20, res.length);
return res;
}}
getOptionLabel={(o) => o?.fullName ?? ""}