File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ export interface DayProps extends BasicDayProps {
1616 dayComponent ?: React . ComponentType < DayProps & { date ?: DateData } > ;
1717}
1818
19- const Day = ( props : DayProps ) => {
19+ const Day = React . memo ( ( props : DayProps ) => {
2020 const { date, marking, dayComponent, markingType} = props ;
2121 const _date = date ? new XDate ( date ) : undefined ;
22- const _isToday = _date ? isToday ( _date ) : undefined ;
22+ const _isToday = isToday ( _date ) ;
2323
2424 const markingAccessibilityLabel = useMemo ( ( ) => {
2525 let label = '' ;
@@ -59,6 +59,7 @@ const Day = (props: DayProps) => {
5959
6060 const Component = dayComponent || markingType === 'period' ? PeriodDay : BasicDay ;
6161
62+ console . warn ( date ) ;
6263 return (
6364 < Component
6465 { ...props }
@@ -68,9 +69,10 @@ const Day = (props: DayProps) => {
6869 { formatNumbers ( _date ?. getDate ( ) ) }
6970 </ Component >
7071 ) ;
71- } ;
72+ } ) as any ;
73+
74+ export default Day ;
7275
73- export default React . memo < DayProps > ( props => < Day { ...props } /> ) ;
7476Day . displayName = 'Day' ;
7577Day . propTypes = {
7678 ...BasicDay . propTypes ,
You can’t perform that action at this time.
0 commit comments