Reset Button Not Clearing Date Selection in Date Range Picker Widget Angular Material

Discussão em 'Angular' iniciado por Santosh Shinde, Outubro 18, 2024.

  1. I have a reset button in the date range picker, but when I try to reset the selected dates using the reset button, it resets the models but not the selection in the date range picker widget.

    StackBlitz link: https://stackblitz.com/edit/4wfp1v-mbnz3s?file=src/example/date-range-picker-overview-example.html

    Steps to reproduce:

    Open the date range picker widget. Select a date range. Click the reset button. Observe that while the underlying models are reset, the date selection in the date range picker widget remains unchanged. Expected Behavior I was expecting the date range picker widget to completely clear the selected dates and reset to its default state when the reset button is clicked, along with resetting the underlying models.

    Actual Behavior The actual behavior is that when the reset button is clicked, the underlying models are reset, but the selected dates in the date range picker widget remain highlighted and do not clear.

    Environment Angular: ^19.0.0-next.2 CDK/Material: ^19.0.0-next.2 Browser(s): Chrome Operating System (e.g. Windows, macOS, Ubuntu): Windows and Ubuntu

    Continue reading...

Compartilhe esta Página