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

Remove seconds

Asked by Eduardo Luis
2 years ago.

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

Thank you.

Comment posted by Eduardo Luis
2 years ago.
Comment posted by Dan Letecky [DayPilot]
2 years 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
2 years 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]
2 years 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
2 years ago.

Ok, Nice.
:)

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.