From ea1f271fbe440cebda9ded7a0ccbe602e3dcc2eb Mon Sep 17 00:00:00 2001 From: DavydVeremchuk Date: Sun, 29 Aug 2021 06:33:30 +0300 Subject: [PATCH] add: new ways for customization Now it is possible to customize the main Calendar container and DaysGridView component. Also fixed a little type in the main Calendar container (styles -> style) --- CalendarPicker/DaysGridView.js | 4 ++-- CalendarPicker/index.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CalendarPicker/DaysGridView.js b/CalendarPicker/DaysGridView.js index 7222334..715b714 100644 --- a/CalendarPicker/DaysGridView.js +++ b/CalendarPicker/DaysGridView.js @@ -223,7 +223,7 @@ export default class DaysGridView extends Component { } render() { - const { styles } = this.props; + const { styles, daysWrapperStyles } = this.props; const { daysGrid } = this.state; const renderedDaysGrid = daysGrid.map((weekRow, i) => ( @@ -232,7 +232,7 @@ export default class DaysGridView extends Component { )); return ( - + { renderedDaysGrid } ); diff --git a/CalendarPicker/index.js b/CalendarPicker/index.js index 6c60fac..5faf0a6 100644 --- a/CalendarPicker/index.js +++ b/CalendarPicker/index.js @@ -393,6 +393,7 @@ export default class CalendarPicker extends Component { selectedRangeStyle: this.props.selectedRangeStyle, selectedRangeEndStyle: this.props.selectedRangeEndStyle, customDatesStyles: this.props.customDatesStyles, + daysWrapperStyles: this.props.daysWrapperStyles, }; } @@ -484,6 +485,7 @@ export default class CalendarPicker extends Component { onMonthChange, scrollable, horizontal, + calendarContainerStyles, } = this.props; let content; @@ -528,7 +530,7 @@ export default class CalendarPicker extends Component { break; default: content = ( - +