DateRangePicker doesn't fire RangeSelected or ValueChange events

Hello!
I'm implementing custom grid's filter menu for date column using daterangepicker

If i select different than current month in date range, rangeselected event doesn't fired.

see attachment.

@page "/"

<SfGrid TValue="Order" AllowFiltering="true">
    <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Menu" ShowFilterBarStatus="true" />
    <GridColumns>
        <GridColumn Field="@nameof(Order.Id)" />
        <GridColumn Field="@nameof(Order.Date)">
            <FilterTemplate>
                <SfDateRangePicker StartDate="@start" EndDate="@end"
                                   ShowClearButton="false" Format="dd.MM.yy"
                                   AllowEdit="false" CssClass="e-date-filter">
                    <DateRangePickerEvents RangeSelected="@DateRangeSelectHandler" ValueChange="@RangeChanged" />
                </SfDateRangePicker>
            </FilterTemplate>
            </GridColumn>
    </GridColumns>
</SfGrid>


@code{

    DateTime? start, end;

    private void DateRangeSelectHandler(RangeEventArgs args)
    {
        // doesn't fired if current month is changed

        if (args.DaySpan > 0)
        {
            start = args.StartDate;
            end = args.EndDate;
            (args.Element as Newtonsoft.Json.Linq.JObject).ToObject<SfDateRangePicker>().Hide();
        }
    }

    private void RangeChanged(RangeEventArgs args)
    {
        // doesn't fired if current month is changed
    }

    public class Order
    {
        public int Id { get; set; }
        public DateTime? Date { get; set; }
    }
}

<style>
    .e-date-filter .e-footer {
        display: none !important;
    }
    
    .e-flm_optrdiv {
        display: none;
    }
    
    .e-flmenu-valuediv {
        padding: 0 !important;
    }
</style>


Attachment: SyncfusionTest_7c5665e.rar

1 Reply

RS Renjith Singh Rajendran Syncfusion Team October 6, 2020 02:32 PM UTC

Hi Ivan, 

We have confirmed it as a bug and logged the defect report “Problem with triggering DateRangePicker event when render DateRangePicker inside FilterTemplatefor the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming bi-weekly release which is expected to be rolled by the end of October, 2020. 
    
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    

Regards, 
Renjith Singh Rajendran 



Loader.
Up arrow icon