Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
How to add a 'Business Year' condition to the AG Grid filter?

We use AG Grid and I can see that in the date filter we have 'This Week', 'This Quarter', 'This Month', 'This Year' etc. But our year is a business year that runs from April to March. How can I add that option to the filter?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Based on the date filters that you list, I am fairly sure that you are using AdapTable - our AG Grid add-on. If so, then you simply need to add a Custom Predicate in the AdapTableQLOptions section of AdapTable Options and make it available for all Date column filters. Based on your question something like this should do the trick:

adaptableQLOptions: {
  customPredicateDefs: [
    {
       id: 'business_year',
       moduleScope: ['filter'],
       columnScope: { 
         DataTypes: ['Date'] 
       },
       label: 'Business Year',
       handler: ({ value, inputs }) => {
         const businessYearStart: Date = new Date(2022, 3, 1);
         const businessYeaEnd: Date = new Date(2023, 2, 31);
         return value >= businessYearStart && value <= businessYeaEnd;
       },
    },
  ],
}

This will make that filter appear in Quick Filter bar dropdown for all Column Filters. See more at: https://docs.adaptabletools.com/guide/adaptable-ql-predicate-custom

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda