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