-
Hello @gpbl! Version 8 of |
Beta Was this translation helpful? Give feedback.
Answered by
gpbl
Feb 27, 2021
Replies: 1 comment 1 reply
-
@lmaze thanks for the heads up! What are you using the import * as React from 'react';
import { DayContent, DayContentProps, DayPicker } from 'react-day-picker';
import { format } from 'date-fns';
function DateTime(props: DayContentProps) {
const dateTime = format(props.date, 'yyyy-MM-dd');
return (
<time dateTime={dateTime}>
<DayContent {...props} />
</time>
);
}
export default function App() {
return <DayPicker components={{ DayContent: DateTime }} />;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lmaze
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lmaze thanks for the heads up!
What are you using the
renderDay
prop for? Using theDayContent
custom component should be enough to replacerenderDay
: https://react-day-picker-next.netlify.app/guides/custom-components