Dynamically Building the Date Header

I want to customise the date header so that it matches the start and end dates of a project

I set the view to Timeline and Day then specify the number of days within the date range , but it doesn’t seem to update correctly.

Below is a snippet on how I currently do it in the language Im using . You can get the idea.

“timeline” hoSchedule
“type” jsonTypeString “day”
“size” jsonTypeInteger iDays
“startTime” jsonTypeString “00:00”
“endTime:” jsonTypeString “24:00”
“timeCellStep” jsonTypeInteger 1440
“timeLabelStep” jsonTypeInteger 1440

Do I also need to set the

refDate
selectedDate

?
Regards,
Sam

Hi @Salvatore_Cannone

It is not clear what “doesn’t seem to update correctly” means. Could you share more details?

'Till then I can think of 2 things (based on the screenshot and the shared details):

  1. If you’d like to display a number of days starting from a specific day, the refDate option is the solution, indeed, otherwise it will default to today. Let’s assume that the project starts at 25th of July and lasts for 10 days, set refDate to 25th of July and size to 10.
  2. If you’d like to display the hours too, you have to set resolutionHorizontal: 'hour' under the view option.

Let us know if this helps or if there are other questions.