File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
packages/core/src/Calendar Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export default CalendarView
170170| ` showBar ` | 是否显示导航栏 | Boolean | ` true ` |
171171| ` bar ` | 导航栏 | React.ReactNode | - |
172172| ` onChange ` | 选择时间事件 | (value: string) => void | - |
173- | ` renderDay ` | 自定义渲染日期额外内容 | (date: any ) => React.ReactNode | JSX.Element | - |
173+ | ` renderDay ` | 自定义渲染日期额外内容 | (date: string, currentDate: string ) => React.ReactNode | JSX.Element | - |
174174| ` value ` | 值 | Date | - |
175175
176176
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export interface CalendarProps extends ViewProps {
3131 // 是否显示头部导航栏
3232 showBar ?: boolean ;
3333 // 自定义渲染日期额外内容
34- renderDay ?: ( date : any ) => React . ReactNode | JSX . Element ;
34+ renderDay ?: ( date : string , currentDate : string ) => React . ReactNode | JSX . Element ;
3535 // 值
3636 value ?: Date ;
3737}
@@ -164,7 +164,7 @@ const Calendar = (props: CalendarProps) => {
164164 onPress = { ( ) => goSelectDay ( day ) }
165165 >
166166 < View >
167- { renderDay ?.( day . date || '' ) }
167+ { renderDay ?.( day . date || '' , currentYear + '-' + ( currentMonth + 1 ) ) }
168168 < Text
169169 style = { [
170170 styles . dayText ,
You can’t perform that action at this time.
0 commit comments