davidtran / react-google-flight-datepicker

React date picker inspired by Google Flight
MIT License
386 stars 48 forks source link

maxDate not working with SingleDatePicker #30

Open sainiankit opened 3 years ago

sainiankit commented 3 years ago

https://github.com/JSLancerTeam/react-google-flight-datepicker/blob/705158dee031638092a2b117fba24032a1255af2/src/lib/components/DatePicker/DialogContentDesktop.js#L66

Steps to reproduce - 1.) Use a SingleDatePicker. (With the following props)

<SingleDatePicker
    startDate={value}
    onChange={onChange}
    minDate={new Date(2021, 4, 28)}
    maxDate={new Date(2021, 5, 30)}
    dateFormat={displayFormat}
    monthFormat='MMM YYYY'
    startDatePlaceholder='Date'
    disabled={false}
    startWeekDay='monday'
    singleCalendar
/>

User won't be able to click on next icon because it is disbled.

oleholei commented 2 years ago

I wrote the same issue today. With more detailed steps to reproduce. https://github.com/JSLancerTeam/react-google-flight-datepicker/issues/53