Merge pull request #871 from rrott/fix/870-may-1st-missing
Fixed issue with rendering calendar incorrectly when first day of a m…old
commit
6d596dce71
|
@ -20,8 +20,9 @@ class Day extends Component {
|
|||
dayStyle () {
|
||||
if (this.props.day === 1) {
|
||||
const e = (this.props.sundayFirstDayOfWeek) ? 0 : 1;
|
||||
const firstDay = time.getFirstWeekDay(this.props.viewDate) - e;
|
||||
return {
|
||||
marginLeft: `${(time.getFirstWeekDay(this.props.viewDate) - e) * 100 / 7}%`
|
||||
marginLeft: `${ (firstDay >= 0 ? firstDay : 6) * 100 / 7 }%`
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue