From c392ecda182d90e5d7f4d4bc92a5f60fab9021ce Mon Sep 17 00:00:00 2001 From: takurinton Date: Tue, 5 Sep 2023 09:24:21 +0900 Subject: [PATCH] Fix monthFormat default value (#1408) --- .changeset/hip-queens-wonder.md | 5 +++++ src/components/Calendar/Calendar/Calendar.tsx | 4 ++-- src/components/Calendar/CalendarRange/CalendarRange.tsx | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/hip-queens-wonder.md diff --git a/.changeset/hip-queens-wonder.md b/.changeset/hip-queens-wonder.md new file mode 100644 index 000000000..dd149bd3f --- /dev/null +++ b/.changeset/hip-queens-wonder.md @@ -0,0 +1,5 @@ +--- +"ingred-ui": patch +--- + +Fix monthFormat and weekList default value diff --git a/src/components/Calendar/Calendar/Calendar.tsx b/src/components/Calendar/Calendar/Calendar.tsx index 26823fb81..58bb778c5 100644 --- a/src/components/Calendar/Calendar/Calendar.tsx +++ b/src/components/Calendar/Calendar/Calendar.tsx @@ -46,8 +46,8 @@ export type CalendarProps = React.HTMLAttributes & { const Calendar = forwardRef(function Calendar( { date, - monthFormat, - weekList, + monthFormat = "YYYY年M月", + weekList = ["日", "月", "火", "水", "木", "金", "土"], actions, onClickCloseButton, isOutsideRange = () => false, diff --git a/src/components/Calendar/CalendarRange/CalendarRange.tsx b/src/components/Calendar/CalendarRange/CalendarRange.tsx index 0e3f7210d..2e3a63757 100644 --- a/src/components/Calendar/CalendarRange/CalendarRange.tsx +++ b/src/components/Calendar/CalendarRange/CalendarRange.tsx @@ -69,8 +69,8 @@ export const CalendarRange = forwardRef( { startDate, endDate, - monthFormat, - weekList, + monthFormat = "YYYY年M月", + weekList = ["日", "月", "火", "水", "木", "金", "土"], actions, onClose, isOutsideRange = () => false,