diff --git a/packages/ui/date-picker/src/components/calendar.tsx b/packages/ui/date-picker/src/components/calendar.tsx index c30a40fb4..08653d9b1 100644 --- a/packages/ui/date-picker/src/components/calendar.tsx +++ b/packages/ui/date-picker/src/components/calendar.tsx @@ -220,6 +220,7 @@ const Calendar = ({ altCalendarPresetData, dateMarkPresetData, }) as FormatCalendarItem + return ( {fullTimeInfo.nodeMark && ( @@ -235,7 +236,7 @@ const Calendar = ({ {fullTimeInfo.nodeMark} )} - {fullTimeInfo.text ? ( + {fullTimeInfo.text || fullTimeInfo.name ? ( { altCalendarPreset === 'id-ID' && showHolidayDetail(fullTimeInfo) @@ -250,7 +251,8 @@ const Calendar = ({ fullTimeInfo.highlight ? `${prefixCls}__lunar--highlight` : '' }`} > - {fullTimeInfo.text} + {/* 如果是节气,使用 fullTimeInfo.name */} + {fullTimeInfo.name || fullTimeInfo.text} ) : null} diff --git a/packages/ui/date-picker/src/types.ts b/packages/ui/date-picker/src/types.ts index 5ea13fc8f..8483860e3 100644 --- a/packages/ui/date-picker/src/types.ts +++ b/packages/ui/date-picker/src/types.ts @@ -49,7 +49,10 @@ export interface FormatCalendarItem { * 节点标记 */ nodeMark?: React.ReactNode - + /** + * 节气名称 + */ + name?: string FullText?: string }