search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Remove seconds

Asked by Eduardo Luis
1 month ago.

How can I remove the seconds from the timeslot hours?
Attached file for more detail...

Thank you.

Comment posted by Eduardo Luis
1 month ago.
Comment posted by Dan Letecky [DayPilot]
1 month ago.

By default, the time header displays only hour, minutes and (depending on the locale) the am/pm string.

You can customize the time header HTML using onBeforeTimeHeaderRender event handler:
https://doc.daypilot.org/calendar/time-header-customization/

You might want to check your onBeforeTimeHeaderRender handler to see where the extra string comes from.

Let me know if it didn't help.

Comment posted by Eduardo Luis
1 month ago.

Ok.. Found it... It's ok...

But looks there is a bug or something...
To appear good I changed the line
args.header.html = args.header.hours + ":" + args.header.minutes + " *";

to
args.header.html = args.header.hours;
I removed the minutes and they appear anyway.. but good.

I think it was when I switched to:
dp.cellDuration = "15";

Answer posted by Dan Letecky [DayPilot]
1 month ago.

Yes, you're right. There seems to be a problem with timeHeaderCellDuration values other than 60.

It should be fixed now in the latest sandbox build (2021.2.5010):
https://javascript.daypilot.org/sandbox/

Comment posted by Eduardo Luis
1 month ago.

Ok, Nice.
:)

New Reply
This reply is
Your name (optional):