Having date range filter in GridMvc

1.1k views Asked by At

My requirement is to have date range filter in one of the date type column in Grid.Mvc plugin, As of now I am able to apply filter on single date picker control with "Equal", "Greater Than" and "Less Than" options.

Ref: Image

But my requirement is to have "Between" clause and set of two date picker controls from where user can select "From Date" and "To Date".

1

There are 1 answers

0
Aryan Firouzian On

You need to post your code to get better answer. Considering mvc-grid documentation, you need to use MultiFiltering, and if you want to modify the appearance then you need to define a custom filter.

Here is links to documentation: MultiFiltering, Custom Filtering

If you don't need the custom control and multi-filtering is fine for you:

@model IEnumerable<Person>

@(Html
    .Grid(Model)
    .Build(columns =>
    {
        columns.Add(model => model.Registration).Titled("Registration").Filterable(true);    
        columns.Add(model => model.Details).Titled("Details").MultiFilterable(true);
})
)

If you need to create a custom filtering take a look at Filter Registration