@@ -11,6 +11,7 @@ import './calendar.css';
1111interface CalendarProps extends RenderProps {
1212 filterDate : ( date : Date ) => boolean ;
1313 inline : SemanticDatepickerProps [ 'inline' ] ;
14+ inverted : SemanticDatepickerProps [ 'inverted' ] ;
1415 maxDate ?: Date ;
1516 minDate ?: Date ;
1617 months : Locale [ 'months' ] ;
@@ -43,6 +44,7 @@ const Calendar: React.FC<CalendarProps> = ({
4344 getDateProps,
4445 getForwardProps,
4546 inline,
47+ inverted,
4648 maxDate,
4749 minDate,
4850 months,
@@ -56,6 +58,7 @@ const Calendar: React.FC<CalendarProps> = ({
5658 pointing,
5759} ) => (
5860 < Segment
61+ inverted = { inverted }
5962 className = { cn ( 'clndr-calendars-segment' , {
6063 'clndr-floating' : ! inline ,
6164 [ pointings [ pointing ] ] : ! inline ,
@@ -73,11 +76,13 @@ const Calendar: React.FC<CalendarProps> = ({
7376 < Fragment >
7477 < Button
7578 icon = "angle double left"
79+ inverted = { inverted }
7680 title = { previousYear }
7781 { ...getBackProps ( { calendars, offset : 12 } ) }
7882 />
7983 < Button
8084 icon = "angle left"
85+ inverted = { inverted }
8186 style = { { marginRight : 0 } }
8287 title = { previousMonth }
8388 { ...getBackProps ( { calendars } ) }
@@ -95,11 +100,13 @@ const Calendar: React.FC<CalendarProps> = ({
95100 < Fragment >
96101 < Button
97102 icon = "angle right"
103+ inverted = { inverted }
98104 title = { nextMonth }
99105 { ...getForwardProps ( { calendars } ) }
100106 />
101107 < Button
102108 icon = "angle double right"
109+ inverted = { inverted }
103110 style = { { marginRight : 0 } }
104111 title = { nextYear }
105112 { ...getForwardProps ( { calendars, offset : 12 } ) }
@@ -112,6 +119,7 @@ const Calendar: React.FC<CalendarProps> = ({
112119 { weekdays . map ( ( weekday ) => (
113120 < CalendarCell
114121 key = { `${ calendar . year } -${ calendar . month } -${ weekday } ` }
122+ inverted = { inverted }
115123 title = { weekday }
116124 >
117125 { weekday . slice ( 0 , 2 ) }
@@ -122,7 +130,7 @@ const Calendar: React.FC<CalendarProps> = ({
122130 const key = `${ calendar . year } -${ calendar . month } -${ weekIdx } ` ;
123131
124132 if ( ! dateObj ) {
125- return < CalendarCell key = { key } /> ;
133+ return < CalendarCell key = { key } inverted = { inverted } /> ;
126134 }
127135
128136 const selectable =
@@ -135,6 +143,7 @@ const Calendar: React.FC<CalendarProps> = ({
135143 { ...dateObj }
136144 { ...getDateProps ( { dateObj : { ...dateObj , selectable } } ) }
137145 data-testid = { `datepicker-cell-${ shortDate } ` }
146+ inverted = { inverted }
138147 selectable = { selectable }
139148 >
140149 { dateObj . date . getDate ( ) }
@@ -148,6 +157,7 @@ const Calendar: React.FC<CalendarProps> = ({
148157 </ div >
149158 { showToday && (
150159 < TodayButton
160+ inverted = { inverted }
151161 { ...getToday ( minDate , maxDate ) }
152162 { ...getDateProps ( {
153163 dateObj : getToday ( minDate , maxDate ) ,
0 commit comments