UNDEFINED buttons for cancel, save and delete lightbox



I’m trying to use the Lightbox but for some reason the buttons label are undefined and also the header:

I tried using:

    scheduler.locale.labels['dhx_save_btn'] = 'Save';
    scheduler.locale.labels['dhx_cancel_btn'] = 'Cancel';

but its still not working. Any clue?



I can’t suggest what exactly goes wrong, as I don’t see your code relates to the lightbox changes. But the issue looks like you are trying to access lightbox buttons of the locale object before scheduler initialization(.init) when there are non-accessible. You can console the scheduler.locale.labels objects before and after initialization to see the difference.

If you will run this code after initialization of the scheduler, it should work correctly:

scheduler.init("scheduler_here",new Date(2020,5,30),"week");
scheduler.locale.labels['dhx_save_btn'] = 'Save1';
scheduler.locale.labels['dhx_cancel_btn'] = 'Cancel1';

Here is the demo:

You also can use the onSchedulerReady event to set lightboxes labels:


scheduler.attachEvent("onSchedulerReady", function(){
  scheduler.locale.labels['dhx_save_btn'] = 'Save1';
  scheduler.locale.labels['dhx_cancel_btn'] = 'Cancel1';

If it won’t help and you still have the issue, could you please provide more details, or reproduce it in the demo above:
open the demo => reproduce the issue => click the “Share” button => send me the new link.