We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Is there a way to customize labels in filter popup?

Answered
RPanh asked on September 1, 2020

Hi, i wanted to ask if there is a way to customize labels in filter popup, or apply decimal time format throughout whole flexmonster instance?
I need to convert time values throughout all instance to decimal format, like 4:20 -> 4.33.
Resetting text content manually does not work, as it  resets on scroll.

Attachments:
fm.jpg

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster September 2, 2020

Hi,
 
Thank you for writing to us.
 
You can easily set up a single format for all fields of specific date/time type across the pivot table instance with datePattern, dateTimePattern, or timePattern options.
 
Feel free to check out the following sample illustrating this approach with dateTimePattern as an example: https://jsfiddle.net/flexmonster/tuwd4x7v/
 
Also, here is a detailed overview of date & time formatting in Flexmonster that might come in handy as well: https://www.flexmonster.com/doc/date-and-time-formatting/
 
Please let us know if this helps.
 
Best regards,
Mykhailo

Public
RPanh September 7, 2020

Hi Mykhailo,
Thanks for your answer, but i think I asked a question a bit unclear, time value has to be not only reformatted, but also recalculated, as an example, 4:30 as four hours and thirty minutes should be converted to 4.50, as four and a half an hour, like a decimal value

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster September 8, 2020

Hi,
 
Thank you for specifying what exactly is the desired behavior for your use case.
 
Currently, there is no option to display time fields in the decimal format through the same pattern configurations.
 
The closest alternative would be utilizing the customizeCell() API call to post-process the cells in the grid and apply the necessary format to them – this approach, however, does not cover member formatting inside the filter pop-up window.
 
Another option would be to implement your own filter pop-up window where this kind of behavior would be possible. You might find the full lists of Flexmonster events & API calls helpful for this purpose.
 
Please let us know if you have any other questions we can help you with.
 
Kind regards,
Mykhailo

Please login or Register to Submit Answer