Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda