@@ -18,6 +18,7 @@ import isSameDay from '../utils/isSameDay';
1818import toISODateString from '../utils/toISODateString' ;
1919
2020import ScrollableOrientationShape from '../shapes/ScrollableOrientationShape' ;
21+ import DayOfWeekShape from '../shapes/DayOfWeekShape' ;
2122
2223import {
2324 HORIZONTAL_ORIENTATION ,
@@ -38,7 +39,7 @@ const propTypes = forbidExtraProps({
3839 onDayMouseLeave : PropTypes . func ,
3940 renderMonth : PropTypes . func ,
4041 renderDay : PropTypes . func ,
41- firstDayOfWeek : PropTypes . oneOf ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 ] ) ,
42+ firstDayOfWeek : DayOfWeekShape ,
4243
4344 focusedDate : momentPropTypes . momentObj , // indicates focusable day
4445 isFocused : PropTypes . bool , // indicates whether or not to move focus to focusable day
@@ -78,7 +79,7 @@ export default class CalendarMonth extends React.Component {
7879 weeks : getCalendarMonthWeeks (
7980 props . month ,
8081 props . enableOutsideDays ,
81- props . firstDayOfWeek === null ? moment . localeData ( ) . firstDayOfWeek ( ) : props . firstDayOfWeek ,
82+ props . firstDayOfWeek == null ? moment . localeData ( ) . firstDayOfWeek ( ) : props . firstDayOfWeek ,
8283 ) ,
8384 } ;
8485 }
@@ -92,7 +93,7 @@ export default class CalendarMonth extends React.Component {
9293 weeks : getCalendarMonthWeeks (
9394 month ,
9495 enableOutsideDays ,
95- firstDayOfWeek === null ? moment . localeData ( ) . firstDayOfWeek ( ) : firstDayOfWeek ,
96+ firstDayOfWeek == null ? moment . localeData ( ) . firstDayOfWeek ( ) : firstDayOfWeek ,
9697 ) ,
9798 } ) ;
9899 }
0 commit comments