In Moment.js I can compare dates just like this:
moment('2010-10-20').isAfter('2010-01-01', 'year');
But in react-moment I just can't find anything about the method `.isAfter. I want to compare the following values:
<TableCell>{ <Moment format="DD.MM.YYYY HH:mm">{row.nextIntervention}</Moment> isAfter <Moment format="DD.MM.YYYY HH:mm" /> ? <Moment format="DD.MM.YYYY">{row.nextIntervention.toString()}</Moment> : "heyhey"} </TableCell>
So as you can see, this code doesn't work (of course). Do you know anything that can hel me solve this?
In Moment.js I can compare dates just like this:
moment('2010-10-20').isAfter('2010-01-01', 'year');But in react-moment I just can't find anything about the method `.isAfter. I want to compare the following values:
<TableCell>{ <Moment format="DD.MM.YYYY HH:mm">{row.nextIntervention}</Moment> isAfter <Moment format="DD.MM.YYYY HH:mm" /> ? <Moment format="DD.MM.YYYY">{row.nextIntervention.toString()}</Moment> : "heyhey"} </TableCell>So as you can see, this code doesn't work (of course). Do you know anything that can hel me solve this?