Get the key Value in the dhtmlxschedular.js

Hello,

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

Examples

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”} ];

	scheduler.createUnitsView({
		name:"unit",
		property:"section_id",
		list:[b]sections[/b],
		size:5,
		step:5
	});

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

this.templatesthis._mode+"_scale_date"

but i don’t get the value like 120

how can i get that ?

Please help me .

Thanks,
Tarun Malpani.

Starting from scheduler 2.3 you can use getLabel
docs.dhtmlx.com/doku.php?id=dhtm … getlabel&s[]=getLabel

Hello,

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.

this.templatesthis._mode+"_scale_date"

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

Thanks,
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 ?

Hi

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

Please go with following steps…

(1)http://dev.indianic.com/salonbokking/public/
(2)click on login…
(3)Please Enter this in Username:frontuser@indianic.com 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…

dev.indianic.com/salonbokking/pu … 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='http://dev.indianic.com/salonbokking/public/calender1/samples/06_timeline/frontdesk.php?clienttt="+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 --> dev.indianic.com/salonbokking/pu … ienttt=120

Not like this —> dev.indianic.com/salonbokking/pu … ag%20patel

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

Thanks,
Tarun Malpani
Develoepr

Hello All,

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

I have to check this on urgent basis.

Thanks,
Tarun Malpani

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

scheduler._props[name].list

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.