Skip to content

Commit 2c55797

Browse files
authored
Merge pull request #57 from srini-leanfolks/fix/38
[Fix] Removed shortString and ucFirst from month text render
2 parents 24e8d21 + e4c5b85 commit 2c55797

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/components/Calendar/Months.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import dayjs from "dayjs";
22
import React, { useContext } from "react";
33

44
import DatepickerContext from "../../contexts/DatepickerContext";
5-
import { loadLanguageModule, shortString, ucFirst } from "../../helpers";
5+
import { loadLanguageModule } from "../../helpers";
66
import { RoundedButton } from "../utils";
77

88
interface Props {
@@ -23,13 +23,9 @@ const Months: React.FC<Props> = ({ clickMonth }) => {
2323
}}
2424
>
2525
<>
26-
{ucFirst(
27-
shortString(
28-
dayjs(`2022-${1 + item}-01`)
29-
.locale(i18n)
30-
.format("MMM")
31-
)
32-
)}
26+
{dayjs(`2022-${1 + item}-01`)
27+
.locale(i18n)
28+
.format("MMM")}
3329
</>
3430
</RoundedButton>
3531
))}

src/components/Calendar/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
getNumberOfDay,
1212
loadLanguageModule,
1313
nextMonth,
14-
previousMonth,
15-
shortString
14+
previousMonth
1615
} from "../../helpers";
1716
import {
1817
ChevronLeftIcon,
@@ -263,7 +262,7 @@ const Calendar: React.FC<Props> = ({
263262
hideYears();
264263
}}
265264
>
266-
<>{shortString(calendarData.date.locale(i18n).format("MMM"))}</>
265+
<>{calendarData.date.locale(i18n).format("MMM")}</>
267266
</RoundedButton>
268267
</div>
269268

0 commit comments

Comments
 (0)