fix: ui improvement (#395)
* fix: current cycle date updation * fix: sidebar overflow fix , date helper fn added
This commit is contained in:
parent
30a91a6b91
commit
afe2b029c0
6 changed files with 43 additions and 41 deletions
|
|
@ -125,3 +125,23 @@ export const renderShortDateWithYearFormat = (date: Date) => {
|
|||
const year = date.getFullYear();
|
||||
return isNaN(date.getTime()) ? "N/A" : ` ${month} ${day}, ${year}`;
|
||||
};
|
||||
|
||||
export const renderShortDate = (date: Date) => {
|
||||
const months = [
|
||||
"Jan",
|
||||
"Feb",
|
||||
"Mar",
|
||||
"Apr",
|
||||
"May",
|
||||
"Jun",
|
||||
"Jul",
|
||||
"Aug",
|
||||
"Sep",
|
||||
"Oct",
|
||||
"Nov",
|
||||
"Dec",
|
||||
];
|
||||
const day = date.getDate();
|
||||
const month = months[date.getMonth()];
|
||||
return isNaN(date.getTime()) ? "N/A" : `${day} ${month}`;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue