Get the key Value in the dhtmlxschedular.js


I am facing the problem to get the key value in the dhtmlxschedular.js.
how can i get that key value ?.


We pass the key value in such a way

var sections=[
{key:120, label:“tarun malpani”},{key:61, label:“fname lname”},{key:92, label:“alex james”},{key:21114, label:“Leah Lamphier”} ];


In dhtmlxschedular.js we can get the Name like “tarun Malpani” with this value.


but i don’t get the value like 120

how can i get that ?

Please help me .

Tarun Malpani.

Starting from scheduler 2.3 you can use getLabel … getlabel&s[]=getLabel


Thanks for the replay.

but this will not help me.this is used with light box.

What i want is

When the label will display in the calender like “tarun malpani” | “fname lname”
i want to give the link to them. with the tag. i have set the href tag but it pass the label like “tarun Malpani”.i want to pass the key

I get the "tarun malpani " value with this code.


on the a href link I have to pass the key of that means 120.

Can you give me your skype id or gtalk id. so that i can explain you the problem in detail

Tarun Malpani

but this will not help me.this is used with light box.
Yep, you are right, above methods will not work if you are using such collection only in timeline config and not use it for the lightbox.

The common approach for such case - store key (id) of record in property of event, and create a custom function which will iterate through array of values and return label of related record.

Can you please give me a example of this ?


I am sharing a link with you on which i am working

Please go with following steps…

(2)click on login…
(3)Please Enter this in and Password is indianic

Now Calender Opens…

Please go to following link so there would be only calender opens so you cans see the view source of the file and you can get the exact idea what i want… … ntdesk.php

var sections=[
{key:120, label:“chirag patel”},{key:61, label:“fname lname”},{key:92, label:“fname2 lname2”},{key:21114, label:“Leah Lamphier”},{key:21127, label:“parmesh parmesh”},{key:21116, label:“Sherill Dubois Watt”} ];

You can see by default the Service Provider Tab is Open…

Here we can see all the Members Like “chirag patel” , 'fname lname",“fname2 lname2” etc…

I have to give a Link on this with his key means id = 120 on the Link I have to Pass.

I am knowing pass the name in the link like this way

A.innerHTML="<a href='"+this.templates[this._mode+"_scale_date"](E,this._mode)+"'>"+this.templates[this._mode+"_scale_date"](E,this._mode)+"</a>";

but i have to pass the Id.

I want this as Output --> … ienttt=120

Not like this —> … ag%20patel

Can you please help me. or call me at +91 9427960264.

Tarun Malpani

Hello All,

is this possible or not ? Pleae replay me as early as possible.

I have to check this on urgent basis.

Tarun Malpani

There is no simple solution, at that point you can locate original collection of values as


where name - name of unit view
To get ID you need to iterate through that collection, comparing labels of options with one, returned by template.