HELP! Dynamic filtering based on current day and time?

HELP! Dynamic filtering based on current day and time?

alan1205alan1205 Posts: 2Questions: 1Answers: 0
edited March 2019 in Free community support

Trying to build a real-time agenda of classes happening at an event. I want to filter my table automatically by classes that are happening now (current time). I want to remove or hide any classes that is not ongoing. Here is what my data looks like:

**Course ID | Subject | Date | Start Time | End Time **

Is this possible?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @alan1205 ,

    This thread should help, it's asking the same thing.

    Cheers,

    Colin

  • alan1205alan1205 Posts: 2Questions: 1Answers: 0

    Hi @colin ,

    How do I filter a column and match it to the current day and time. Does that make sense?

    For example if the time of now is 8:00AM, I want to filter all the 8:00AM classes to the top. If its 9:00 AM, I want it to filter all the 9:00AM classes at the top.

    Thanks,
    Alan

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @alan1205 ,

    That's not possible out the box. However, there is an ordering plugin called absolute which keeps preset values at the top (or the bottom) of the table. The condition for being at the top is defined at initialisation, so you would need to destroy (destroy() or destroy) and reinitialise with the time you want. It's possible, and if the table is small it shouldn't be a problem - if too large you may see unsightly flickers.

    Cheers,

    Colin

This discussion has been closed.