addMarkedTimesapn Formatting issue

Hello all!

Im working on an ASP.Net MVC application using the DHtmlxScheduler library.
From my database I have various working hours for items from the y_axis. After performing some logic in the controller and accessing these values in the view, I think my format for some of these values are incorrect, thus they are not being read by the Scheduler API correctly.

code for addMarkedTimespans:

scheduler.addMarkedTimespan({ days: [1,2,3,4,5], zones: [480, 1020], type: "dhx_time_block", css: "red_section", html: "<div style='text-align: center; height: 44px;'> <b style='color=black; '> Blocked Hours </b> </div>", sections: { timeline: "20602"} });

any help will be tremendously appreciated!

images of the actual values located below:



Hi,
i’ve tried your code in online example (changed section id to ‘1’), it seems to be working
docs.dhtmlx.com/scheduler/sample … units.html
Try pasting this code in browser console:scheduler.addMarkedTimespan({ days: [1,2,3,4,5], zones: [480, 1020], type: "dhx_time_block", css: "red_section", html: "<div style='text-align: center; height: 44px;'> <b style='color=black; '> Blocked Hours </b> </div>", sections: { timeline: "1"} });
Make sure the appropriate section is loaded into timeline