ok
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dateSelector {
|
||||
|
||||
@@ -59,17 +59,21 @@ const DailyCharts = ({ transactionGraph, colors, type }) => {
|
||||
0
|
||||
);
|
||||
|
||||
const formatDate = (dateString) => {
|
||||
const date = new Date(dateString);
|
||||
const monthNames = [
|
||||
"Jan", "Feb", "Mar", "Apr", "Mei", "Jun", "Jul", "Agu", "Sep", "Okt", "Nov", "Des"
|
||||
];
|
||||
const month = monthNames[date.getUTCMonth()]; // Use getUTCMonth() for UTC month
|
||||
const day = date.getUTCDate(); // Use getUTCDate() for UTC day
|
||||
return { month, day };
|
||||
};
|
||||
|
||||
|
||||
const formatDate = (dateString) => {
|
||||
const date = new Date(dateString); // Parse the date string
|
||||
|
||||
// Create an array of month names (use the same names you had earlier)
|
||||
const monthNames = [
|
||||
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
||||
];
|
||||
|
||||
// Get the month and day
|
||||
const month = monthNames[date.getMonth()]; // Month is 0-indexed (January = 0)
|
||||
const day = date.getDate(); // Get the day of the month
|
||||
|
||||
return { month, day }; // Return the result
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.chartItemContainer}>
|
||||
{chartData &&
|
||||
|
||||
Reference in New Issue
Block a user