how to get min or max dates from a list of dates using moment.js?
You can use moment.max function :
let moments = this.state.dates.map(d => moment(d)),
maxDate = moment.max(moments)
You can use moment.max function :
let moments = this.state.dates.map(d => moment(d)),
maxDate = moment.max(moments)