Blocking scheduler on minutes basis

Hello,

   From past two days i am trying to figure out how to solve this issue but seems like it's not working.I am trying to  block a section considering both hours and minutes.Well it works on hourly basis, but I don't know how to consider minutes as well.

Eg: This is one way to do it.

scheduler.addMarkedTimespan({ start_date: new Date(2014,6,11,10,15), //Here it considers hours and minutes(i.e 10:15 A.M to 11:00 A.M) end_date: new Date(2014,6,11,11), css: "gray_section", type: "dhx_time_block" });

But I want to achieve the same using “days” and “zones” instead of “start_date” and “end_date”

Eg:

scheduler.addMarkedTimespan({ days: 5, zones: [11,15,13*60,2,30,4,15], // Here I want to block from 11:15 A.M to 13:00 pm and 2.30 P.M to 4:15 P.M css: "gray_section", type: "dhx_time_block" });

I know the above code is completely wrong but could you please help me on this?

Thank you.

@here can you any one know the solution for this.

Hello @Ma24, @nabzzzz,

I know the above code is completely wrong but could you please help me on this?

You can achieve the requirement with the following code:

scheduler.addMarkedTimespan({  
    days:  [0,3], 
    zones:[11.25*60,13*60, 14.50*60,16.25*60],
    type:  "dhx_time_block", 
    css:   "gray_section",  // the name of applied CSS class

});

The logic, is that numbers after dot - will be percents of hour, like:
Where 11.25 - will be the 11.15 am.
14.50 - will be the 14.30 pm.
14.75 - will be 14.45 pm.

Here is a demo:
https://snippet.dhtmlx.com/s0mja3q7

Kinds regards,