Image is showing date range picker
I want to remove days up to today and days starting today both label from date range picker how can i do that my code snippet is,
class BetterDatePicker extends Component {
constructor(props) {
super(props);
this.state = {
selectionRange: {
startDate: new Date(),
endDate: new Date(),
key: 'selection',
}
}
}
handleSelect = (ranges) => {
console.log("range", ranges);
this.setState({
selectionRange: ranges.selection
})
}
render() {
return (
<DateRangePicker
ranges={[this.state.selectionRange]}
onChange={this.handleSelect}
minDate={new Date('2020')}
maxDate={new Date('2022')}
/>
)
}
}

You can simply do this with the following code:
The
inputRangeswith an empty array hides the 'days up to today' and 'days starting today'. ThestaticRangeswith an empty array hides the buttons saying 'Yesterday' etc.You can see these documented here: https://www.npmjs.com/package/react-date-range
I also added a line of CSS to hide the container for these inputs: