Calendar does not change when dates are changed via input
See original GitHub issueAs the topic says, the calendar does not switch to the date entered via input box. I have tried it with the demos in storybook: Allow All Days Including Past Days
First enter: 10/25/2019
in startDate
You’ll see it is highlighted in the calendar.
2nd: 10/25/2018
3rd: 10/25/2025
As you can see in the 2nd and 3rd input, it does not render the calendar on those years. In order to see the change in calendar, you need to enter start and end date and close the calendar. Right now I am using the ff. settings:
<DateRangePicker
startDateId="startDate"
endDateId="endDate"
startDate={start}
endDate={end}
daySize={25}
onDatesChange={({ startDate, endDate }) => {
setStateStartDate(startDate);
setStateEndDate(endDate);
}}
focusedInput={focusedInput}
onFocusChange={focused => {
if (focused) {
setStatefocusedInput(focused);
}
}}
keepOpenOnDateSelect
autoFocus={() => true}
hideKeyboardShortcutsPanel
noBorder
isOutsideRange={() => false}
customArrowIcon={<i className="fa fa-long-arrow-right ml-2" />}
numberOfMonths={2}
showDefaultInputIcon
inputIconPosition="after"
/>
I am using the keepOpenOnDateSelect
for UI/UX purposes.
Question is: How can I re-render the calendar without closing the calendar itself? Is it possible to re-render the calendar upon finished typing?
Also I think it is a bug when isOutsideRange
false, the past dates that were selected aren’t highlighted. They’ll only be highlighted when switching months and they’ll be gone when you focus on the month of the date specified. Found this Past Issue with no solution. Is there any solution now?
The demo isn’t enough to cover all of the props of the datepicker. I hope there will be more examples on how to properly use the props. Thank you very much in advance.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:9 (1 by maintainers)
Top GitHub Comments
Any progress on this? I want to update the dates from outside of calendar and calendar will always in open state.
When I updated the date from outside of the calendar, calendar remained at that month.
any progress on this? I’m having the same problem.
onDatesChange
is called but with null values.