moodysalem / react-tournament-bracket

React components for rendering a tournament bracket
https://moodysalem.github.io/react-tournament-bracket/
MIT License
258 stars 81 forks source link

time and date in topText #13

Closed baomastr closed 6 years ago

baomastr commented 6 years ago

how can i get both date and time in topText?

in the BracketGame component date is transforming toLocaleDateString() how can i transform date toLocaleString() like in the screenshot?

react tournament bracket demo 2018-08-23 11-44-11

https://github.com/moodysalem/react-tournament-bracket/blob/436b4ab75da8ca047a00c14a72db95b60e3a703a/src/components/BracketGame.tsx#L47

baomastr commented 6 years ago

already found. just pass in props to component like topText={({ scheduled }: Game) => new Date(scheduled).toLocaleString()}