Skip to content

minDate & maxDate don't work with Month Picker #1685

Closed
@danielemanassero

Description

@danielemanassero

I have this DatePicker component:

<DatePicker selected={new Date()} onChange={date => {this.changeFiltersDates(date, type)}} dateFormat="MM/yyyy" showMonthYearPicker className="private-date-filter" name="from" calendarClassName="date-filter-calendar" placeholderText="From" minDate={this.defaultMinDate} maxDate={this.defaultMaxDate} />

where

this.defaultMinDate = new Date(2017, 0, 1); this.defaultMaxDate = new Date();
but DatePicker component dont't work correctly, because don't respect the minDate and maxDate props.

minDate allows the selection of an extra year back and maxDate allows the selection of one more year ahead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions