update TypeUploadSingle.tsx and date.ts
This commit is contained in:
parent
1d2ef1074c
commit
65b84b16ca
|
|
@ -84,7 +84,9 @@ export const FieldUploadSingle: FC<{
|
|||
.pop()}`;
|
||||
input.isLocal = true;
|
||||
input.render();
|
||||
console.log(input.preview);
|
||||
if (typeof on_change === "function") {
|
||||
on_change({});
|
||||
}
|
||||
return;
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ export const timeAgo = (date: string | Date) => {
|
|||
};
|
||||
export const formatTime = (date: string | Date) => {
|
||||
if (date instanceof Date || typeof date === "string") {
|
||||
return day(date).format("hh:mm");
|
||||
return day(date).format("HH:mm");
|
||||
}
|
||||
return "-";
|
||||
};
|
||||
|
||||
export const time = (date: string | Date) => {
|
||||
if (date instanceof Date || typeof date === "string") {
|
||||
return day(date).format("hh:mm");
|
||||
return day(date).format("HH:mm");
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue