From e866be1024d7d6581046d5a02be577001fc75e01 Mon Sep 17 00:00:00 2001 From: smesgr Date: Tue, 14 Nov 2017 16:01:24 +0100 Subject: [PATCH 1/2] add month parameter to renderWeek --- src/Month.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Month.js b/src/Month.js index 7d0e8a3227..f28e461d68 100644 --- a/src/Month.js +++ b/src/Month.js @@ -194,7 +194,7 @@ export default class Month extends Component { onKeyUp={e => e.keyCode === ENTER && onWeekClick(weekNumber, week, e)} > - {this.props.renderWeek(weekNumber, week)} + {this.props.renderWeek(weekNumber, week, month)} )} {week.map(this.renderDay)} From 2c1ee03b186370d7254572cd0318d866349af85c Mon Sep 17 00:00:00 2001 From: smesgr Date: Wed, 29 Nov 2017 14:30:38 +0100 Subject: [PATCH 2/2] add parameter to function --- types/props.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/props.d.ts b/types/props.d.ts index 195e7ae211..95ca949119 100644 --- a/types/props.d.ts +++ b/types/props.d.ts @@ -136,7 +136,7 @@ export interface DayPickerProps { ): void; pagedNavigation?: boolean; renderDay?(date: Date, modifiers: Modifiers): React.ReactNode; - renderWeek?(weekNumber: number, week: Date[]): React.ReactNode; + renderWeek?(weekNumber: number, week: Date[], month: Date): React.ReactNode; reverseMonths?: boolean; selectedDays?: Modifier | Modifier[]; showWeekNumbers?: boolean;