hypeserver / react-date-range

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

onShownDateChange does not fire when calling a Function #452

Open NiksanJP opened 3 years ago

NiksanJP commented 3 years ago

Subject of the issue

When you use onShownDateChange on DateRange. It does not fire a function when the function is called using

  1. onShownDateChange={(a,b) => changeDateVals(a,b)}
  2. onShownDateChange={changeDateVals}

[BUG] Bug Reproduce Steps

Using <DateRange className='ClanderProps' itemWidth={500} editableDateInputs={true} onChange={item => setDateVals([item.selection])} moveRangeOnFirstSelection={false} ranges={dateVals} onShownDateChange={changeDateVals} /> changeDateVals is a Function.

[BUG] Expected behaviour

Expected to run changeDateVals without any problem

Environment

Package Version:1.13 I think React version:17.0.0 Node version:14.15.0 Browser: Google Chrome

kamyar commented 3 years ago

I will take a look into this and get back 👍

anticol commented 2 years ago

@kamyar any news?