You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating picker's value programatically, it sets endDate first and startDate after this (this is determined by the order of options in getOptions). However, when setting endDate, bootstrap-daterangepicker ensures that endDate > startDate and sets startDate value to endDate if not. This can cause incorrect behavior in the following scenario:
Create date range picker in single mode
Combine it with <input> that can be edited and used to update picker's state from the outside
Initialize picker with some date, lets say 2018-01-07
Change manually date in the input to 2018-01-01 (must be date before original date)
5. Open picker - picker shows range 2018-01-01 - 2018-01-07
Close and open again - show correctly single date: 2018-01-01
Quick workaround in my code was to call setState({ startDate: ...}) first and setState({ endDate: ...}) in the callback, but I believe it should be fixed in react-bootstrap-daterangepicker's code, so setting two values at once works correctly.
The text was updated successfully, but these errors were encountered:
When updating picker's value programatically, it sets
endDate
first andstartDate
after this (this is determined by the order of options ingetOptions
). However, when settingendDate
,bootstrap-daterangepicker
ensures thatendDate
>startDate
and setsstartDate
value toendDate
if not. This can cause incorrect behavior in the following scenario:<input>
that can be edited and used to update picker's state from the outside5. Open picker - picker shows range 2018-01-01 - 2018-01-07
Quick workaround in my code was to call
setState({ startDate: ...})
first andsetState({ endDate: ...})
in the callback, but I believe it should be fixed in react-bootstrap-daterangepicker's code, so setting two values at once works correctly.The text was updated successfully, but these errors were encountered: