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

Hide TimeHeaders with Java-API

Asked by Christoph
4 years ago.

I want hide the Timeheaders on the Calendar, i use DayPilot Pro for Java.

I do not get the desired result - i have allways a Line on the Header :(

I tested following usages on Java-Side:

  • "getTimeHeaders().add(new TimeHeader(GroupBy.NONE));"
  • Result: there is 1 blank line - see Picture
  • no Usage from "getTimeHeaders().add" or "getTimeHeaders().clear();"
  • occur 2 lines with the date - see Picture


Following code on JavaScript-Side:

  • dp.showBaseTimeHeader = false;
  • dp.timeHeaders = [];


Important Information:

if i add the Resources and Events only via Javascript, it works fine.

Like....
dp.resources = [
{name: "Date", id: "A"},
{name: "Room B", id: "B"},
{name: "Room C", id: "C"}
];

dp.events.list = [
{
start: "2016-01-23T12:00:00",
end: "2016-01-24T12:00:00",
id: "1",
resource: "A",
text: "26."
},

Comment posted by Christoph
4 years ago.

The Problem is the Method "getTimeHeadersResolved" in the class "org.daypilot.ui.DayPilotScheduler".

If i comment the 2 Lines:
// fromGroupBy.add(new TimeHeader(GroupBy.DEFAULT));
// fromGroupBy.add(new TimeHeader(GroupBy.CELL));
it works.

I use the api false??

Answer posted by Dan Letecky [DayPilot]
4 years ago.

It looks like a bug. Normally, you should be able to hide the time header using getTimeHeaders().clear(). Please let me check the problem.

You can also try to set the header height to 0 as a workaround until it's fixed:

// ...
dp.headerHeight = 0;
dp.init();
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.