I'm new to React and I've come across 'react suite' which I'm currently using for the DateRangePicker component.
However, I'm struggling to get the start date and end date in a format that is suitable. At the moment I can print in the console the object which looks like this:
Essentially what I would like to do is to print the date in the following format YYYY/MM/DD.
I can imagine that this is probably something straightforward to do, however, I'm struggling to find an appropriate way to do this so any help is appreciated!
My code:
handleSelect(range) {
console.log(range)
}
render() {
return (
<div className="menu">
<DateRangePicker
onChange = {this.handleSelect}
/>
</div>
)
}