File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ export default class DaysView extends React.Component {
53
53
54
54
renderDays ( ) {
55
55
const date = this . props . viewDate ;
56
+ const startOfMonth = date . clone ( ) . startOf ( 'month' ) ;
57
+ const endOfMonth = date . clone ( ) . endOf ( 'month' ) ;
56
58
57
59
// We need 42 days in 6 rows
58
60
// starting in the last week of the previous month
@@ -66,7 +68,7 @@ export default class DaysView extends React.Component {
66
68
67
69
while ( startDate . isBefore ( endDate ) ) {
68
70
let row = getRow ( rows , i ++ ) ;
69
- row . push ( this . renderDay ( startDate ) ) ;
71
+ row . push ( this . renderDay ( startDate , startOfMonth , endOfMonth ) ) ;
70
72
startDate . add ( 1 , 'd' ) ;
71
73
}
72
74
@@ -75,9 +77,7 @@ export default class DaysView extends React.Component {
75
77
) ) ;
76
78
}
77
79
78
- renderDay ( date ) {
79
- const startOfMonth = this . props . viewDate . clone ( ) . startOf ( 'month' ) ;
80
- const endOfMonth = this . props . viewDate . clone ( ) . endOf ( 'month' ) ;
80
+ renderDay ( date , startOfMonth , endOfMonth ) {
81
81
let selectedDate = this . props . selectedDate ;
82
82
83
83
let dayProps = {
You can’t perform that action at this time.
0 commit comments