hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.58k stars 667 forks source link

How detect if the date is changed from editableDateInputs #445

Open gudapraveenkumar opened 3 years ago

gudapraveenkumar commented 3 years ago

Currently when user changes the date from editableDateInputs or the calendar onChange event is triggered and with this one handler I cannot identify from where this change is triggered.

Screenshot 2021-02-10 at 19 19 48

<DateRange onChange={(item) => handleChange(item)} months={2} ranges={dateTimeRange} dateDisplayFormat={'yyyy-MM-dd HH:mm'} direction="horizontal" editableDateInputs={true} />

Is there any function or workaround to detect if the change is from editableDateInputs but not from the Calendar range selection

code-by-gijs commented 3 years ago

Can confirm this doesn't work. No changes in dates are triggered when using the editableDateInputs :(