bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

`alwaysShowCurrentDate` doesn't work when the Agenda store is filtered. #9699

Closed ExtAnimal closed 3 months ago

ExtAnimal commented 3 months ago

Forum post

Dear Bryntum,

I really appreciate this improvement but unfortunately, this was not exactly the business needed. Currently, our customer needed to display only future events on the AgendaView. Its mean they would like to see the future events only. For this purpose, we use the Filter solution provided by AgendaView:

store: {
    filters: [
        {
        property: 'date',
        operator: '>=',
        value: today.setHours(0, 0, 0, 0),
        },
    ],
},

Unfortunately, your current implementation does not fully satisfy the needs, as there are events in the AgendaStore, but we do not display them because of the Filter. We need this field when the list returned by the AgendaStore filter is empty. If I understand correctly, this filed is currently only displayed if the AgendaStore is empty.

Full AgendaView config:

agenda: {
    date: today,
    startDate: today,
    alwaysShowCurrentDate: true,
    store: {
        filters: [
            {
                property: 'date',
                operator: '>=',
                value: today.setHours(0, 0, 0, 0),
            },
        ],
    },
    eventRenderer: ({ eventRecord, renderData }: any) => {
        return [
            {
                className: 'b-event-name',
                html:
                    '<strong>' +
                    StringHelper.encodeHtml(eventRecord.name) +
                    '</strong> | Megjegyzés: ' +
                    StringHelper.encodeHtml(eventRecord.comment),
            },
        ];
    },
},

I really appreciate any comments:

Best Regards, Adri