ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Emit separate events when only start date or only end date is selected in Daterangepicker

Open mihirpatel1308 opened this issue 4 months ago • 1 comments

Is your feature request related to a problem? Please describe.

Currently, the bsDaterangepicker / bs-daterangepicker-inline component emits bsValueChange only when both start and end dates are selected.

This makes it difficult to handle scenarios where we want to react immediately after the start date is chosen (before the end date is picked), or when the end date is changed separately.

Describe the solution you'd like

Introduce two additional outputs (events) from the component:

  1. startDateChange: EventEmitter<Date> → emits whenever the start date is selected/changed.
  2. endDateChange: EventEmitter<Date> → emits whenever the end date is selected/changed.

mihirpatel1308 avatar Aug 19 '25 12:08 mihirpatel1308

Hi, we'll take a look at the possibility of this enhancement, but as of now I don't think that might happen. DateRange value can't be set by 1 click, and we also need to rollback if you chose only start date and close daterange-picker. When you make first click it might not be a start date, only when you make a second one we determine which one would be which.

Your case can only be covered with 2 separate calendars, in current state.

lexasq avatar Aug 20 '25 12:08 lexasq