Our pure JavaScript Scheduler component


Post by coderboy@12 »

Hi,

How can I remove time from my startDate and endDate I see that bryntum by set displayDateFormat to 'DD/MM/YYYY' but do we have any other options?

Attachments
Snag_3f050a2a.png
Snag_3f050a2a.png (97.35 KiB) Viewed 368 times

Post by tasnim »

Yes. Sure.

You could use DateHelper.format() in the template to achieve that
Please check docs
https://bryntum.com/products/gantt/docs/api/Core/helper/DateHelper#function-format-static

DateHelper.format(new Date(), 'YYYY-MM-DD')

Post by coderboy@12 »

Can you please give me syntax how can I apply DateHelper for Date formation because I've applied other Details in different way.


Post by tasnim »

Sure,

Here is an example of how you could use it in your custom eventTooltip

    features : {
        eventTooltip : {
            template : data => {
                return `
                    <div>
                        <p>Start Date : <strong>${DateHelper.format(data.startDate, 'YYYY/MM/DD')}</strong></p>
                        <p>End Date : <strong>${DateHelper.format(data.endDate, 'YYYY-MM-DD')}</strong></p>
                    </div>
                `;
            }
        }
    }

And here is the output

Screenshot 2023-02-14 123949.png
Screenshot 2023-02-14 123949.png (10.48 KiB) Viewed 345 times

Please check these docs' link
https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/EventTooltip
https://bryntum.com/products/scheduler/docs/api/Core/helper/DateHelper


Post by coderboy@12 »

Thanks Tasnim that worked but what if we want to put clock icon same as bryntum have before date.


Post by tasnim »

We have a private class called ClockTemplate to show those clock icons. Opened a feature request to make it public. Here it is https://github.com/bryntum/support/issues/6167


Post by coderboy@12 »

Thanks Tasnim let me know once you guys done it :)


Post by tasnim »

Sure. Please subscribe to that ticket so that when it fixes it will notify you.

Good Luck :),
Tasnim


Post by coderboy@12 »

Hi Tasnim

Any Update when this feature gonna be available?


Post by tasnim »

Hi,

No updates for now. It's not on the list of the nearest release so can't say when it will be available. If you need this feature urgently, then you could increase the priority of the ticket by sponsoring it.

You could contact our sales here https://bryntum.com/services/ for a feature sponsorship.

All the best


Post Reply