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 {
5353
5454 renderDays ( ) {
5555 const date = this . props . viewDate ;
56+ const startOfMonth = date . clone ( ) . startOf ( 'month' ) ;
57+ const endOfMonth = date . clone ( ) . endOf ( 'month' ) ;
5658
5759 // We need 42 days in 6 rows
5860 // starting in the last week of the previous month
@@ -66,7 +68,7 @@ export default class DaysView extends React.Component {
6668
6769 while ( startDate . isBefore ( endDate ) ) {
6870 let row = getRow ( rows , i ++ ) ;
69- row . push ( this . renderDay ( startDate ) ) ;
71+ row . push ( this . renderDay ( startDate , startOfMonth , endOfMonth ) ) ;
7072 startDate . add ( 1 , 'd' ) ;
7173 }
7274
@@ -75,9 +77,7 @@ export default class DaysView extends React.Component {
7577 ) ) ;
7678 }
7779
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 ) {
8181 let selectedDate = this . props . selectedDate ;
8282
8383 let dayProps = {
You can’t perform that action at this time.
0 commit comments