Scheduler.parse and info box


#1

Hi
I want to use some data from scheduler.parse in info box, for example I have an icon new cost, but I need to know which record
How I can take these kind of datas and use it info box icons
I use new page for this kind of works when clicked at info box
scheduler._click.buttons.invoice = function(openlink){
window.open(‘index.html’, “_blank”);
};
thank you
as


#2

Hi @Erman_Altindag,

Sorry, I am not sure that I fully understand your issue.

If you want to open a link when onclick fires for custom buttons in the QuickInfo window, you can do it in the next way:

scheduler.locale.labels.icon_invoice = "Invoice";
scheduler.config.icons_select = ['icon_invoice'];

var invoiceButton;
scheduler.attachEvent("onQuickInfo",function(eventId){
    invoiceButton = document.querySelector(".icon_invoice");
    console.log(invoiceButton)
});

Demo http://snippet.dhtmlx.com/5/bbe161a70

If you mean smth else - please try to explain with more details to help me understand.


#3

Hi
thank you for your help,

I have something like :
{ start_date: “2020-06-26”, end_date: “2020-06-31”, text:“Task A-12458”, section_id:40,id:202}
.parse code
thats ok
And a button code for quick info
scheduler._click.buttons.invoice …

I need to define or learn when clicked this item , start_date or end_date or id etc…
how can I get this


#4

You should specify the handler for processing clicks on the button:

scheduler._click.buttons.custom = function(id){
   some_function;
};

Open the console in the snippet to see event dates when you click on Invoice button in the snippet.
https://snippet.dhtmlx.com/5/ed92af7bf


#5

Thank you very much Polina
that’s I need,
works perfectly for me