You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage example is outdated and I am having some trouble getting the cards to render.
Here is what I noticed needs to be updated:
const [till] = React.useState(moment().add(3, 'days').toDate()); // instead of toISOString();
renderItem={renderMyItemCard} // instead of cardComponent={myItemCard}
export default function MyItemCard({title, startDate, endDate}) // I'm not sure how to properly set up this component
Thank you
The text was updated successfully, but these errors were encountered:
const [till] = React.useState(moment().add(3, 'days').toDate()); // instead of toISOString();
This is still up-to-date, we support all values supported by Date() constructor, meaning ISO string, UNIX timestamp (number) or Date object are all valid values.
renderItem={renderMyItemCard} // instead of cardComponent={myItemCard}
Thanks for catching this, I will update it ASAP.
export default function MyItemCard({title, startDate, endDate})
This would be your component, responsible for rendering your cards. It receives a bunch of props, so that you could customize your cards appropriately. But, because cardComponent prop is no longer in play, its usage is slightly different, which will also be reflected in the docs.
For now, you can use it like this:
<Timetable{/* other props */}renderItem={props=><MyItemCard{...props}/>}/>
Hello,
The usage example is outdated and I am having some trouble getting the cards to render.
Here is what I noticed needs to be updated:
Thank you
The text was updated successfully, but these errors were encountered: