Use of select box to determine time duration needed to book

I am trying to figure out how to use the key value to map to an event time length, and then on event change update the end procedure time to be time start + event time length based on select list.

    function init() {

var sections=[

        {key:1, label:“Raymond Hung”},

        {key:2, label:“Ed Lebowitz”},

        {key:3, label:“Harry Morrison”},

        {key:4, label:“Richard Silberstein”},

{key:5, label:“Stan Zipser”}


        var procedure=[

        {key:1, label:“pulmonary arteriogram”},

        {key:2, label:“spine biopsy”},

        {key:3, label:“chest tube”},

        {key:4, label:“biliary drainage”},

{key:5, label:“chest biopsy”}


scheduler.locale.labels.workweek_tab = “W-Week”

        scheduler.locale.labels.decade_tab = “10-days”




scheduler.config.xml_date="%Y-%m-%d %H:%i";



            {name:“description”, height:130, map_to:“text”, type:“textarea” , focus:true},

{name:“custom”, height:23, type:“select”, options:sections, map_to:“section_id” },

{name:“prolength”, height:23, type:“select”, options:procedure, map_to:“section2_id” },

            {name:“time”, height:72, type:“time”, map_to:“auto”}






You can use something , similar to the next

var ev = scheduler.getEvent(id);
if (ev.section2_id == some)
ev.end_date =,30,“minute”);

Can you possibly elaborate.  I do not understand how to pass the variable procedure key value which then needs to map to a time in hours/minutes  to the event selection end time.

Hello there Stanislav…

Seems like Mahesh is looking for equal think like me here: index.shtml?cat=kb&page=2&q=12274
But why are you opening that much threads nahesh with same questions ?!?

The sample , which illustrates the desired use-case can be checked at … nt&q=12274