Readonly lightbox with readonly scheduler

With reference to this link
scheduler-net.com/docs/read-only_mode.html

There are two read only modes

  1. entire scheduler ready only
  2. only lightbox ready only

Is there a way to get combination of option 1 and 2. I want entire scheduler to be read only but also like to open the lightbox which is read only. If I go for option 1, I loose lightbox and if I choose option 2, I loose the schedule read only mode which allows users to play with. Of course its not going to save anything but I don’t want to allow that to user.

The reason for this requirement is I have some longer text values which is not properly displayed currently in the scheduler. And if there is a way to allow lightbox to get open in ready only mode user can open the lightbox and read the full text. I also have some other fields that I want to get displayed in lightbox.

Any guidance?

Hi,
you may use read-only lightbox and block event modification with following client-side code:

Thank you for your answers. I have one more question. How can I change the loading gif to the one I want?

Hi,
you can change image with .dhx_loading css class:.dhx_loading{ background-image:url(imgs/loading.gif) !important; }

Is there a way to display only start date in light box?

currently i have following code

var eventDateTime2 = new LightboxTime(“date”, "Event Date: ");
eventDateTime2.Height = 30;
scheduler.Lightbox.Add(eventDateTime2);

and its producing output as

14:00 04 Apr 2013 to 14:05 04 Apr 2013

But I want only start date not even time. And also in this format (dd-MMM-YYYY)

04 Apr 2013

Hi,
there is no built-in way, but you can access html of time control and disable visibility of ‘end_time’ pickersscheduler.attachEvent("onLightbox", function(){ var html = scheduler.formSection("time").node; //somehow manipulate timepicker node });

Following LightBoxRadio works in Firefox but not in IE. On firefox when user opens light box correct radio button is selected. But on IE none of the radio button is selected. Its always blank radio buttons. Is there any reason why? and also is there any work around

public enum EventType
{
    Baseline,
    NonBaseline
}

var eventTypeRadio = new LightboxRadio(“event_type”, "Event Type: ");
eventTypeRadio.AddOption(new LightboxSelectOption(EventType.Baseline, EventType.Baseline.ToString()));
eventTypeRadio.AddOption(new LightboxSelectOption(EventType.NonBaseline, EventType.NonBaseline.ToString()));
scheduler.Lightbox.Add(eventTypeRadio);

Thank you for your reply for the previous post but I still struggling finding correct element to disable. I tried using developers tool and inspect html element but not able to find name for end time.

You suggesting disabling end time in following code but how?

scheduler.attachEvent(“onLightbox”, function(){
var html = scheduler.formSection(“time”).node;
//somehow manipulate timepicker node
});

when inspect html element It shows following how can i reach for my target which is end date time?

11:30
20
March
2013

11:35
20
March
2013

I managed the disabling end date time part. following is the the code if anyone else needs it.

scheduler.attachEvent("onLightbox", function () {
    var html = scheduler.formSection("time").node;
    var spans = html.getElementsByTagName("span");
    var startFlag = false;
    for (var i = 0; i < spans.length; i++) {
        alert(spans[i].innerHTML);
        if (spans[i].innerHTML == " &nbsp;–&nbsp; ") {
            startFlag = true;
        }
        if (startFlag) {
            spans[i].innerHTML = "";
        }
    }
});

Also Can you reply to my previous post where LightBoxRadio is not working on IE9? more details on my previous reply. thanks

Try setting initial value for the control. It will select related optionvar eventTypeRadio = new LightboxRadio("event_type", "Event Type: "); ... scheduler.InitialValues.Add("event_type", (int)EventType.Baseline);

solution you suggesting is not working. Still same. No radio button is selected in IE.

Please provide a complete demo so I could test the problem

Following LightBoxRadio works in Firefox but not in IE. On firefox when user opens light box correct radio button is selected. But on IE none of the radio button is selected. Its always blank radio buttons. Is there any reason why? and also is there any work around

public enum EventType
{
Baseline,
NonBaseline
}

var eventTypeRadio = new LightboxRadio(“event_type”, "Event Type: ");
eventTypeRadio.AddOption(new LightboxSelectOption(EventType.Baseline, EventType.Baseline.ToString()));
eventTypeRadio.AddOption(new LightboxSelectOption(EventType.NonBaseline, EventType.NonBaseline.ToString()));
scheduler.Lightbox.Add(eventTypeRadio);

I did tried the solution you suggested to set default

scheduler.InitialValues.Add(“event_type”, (int)EventType.Baseline);

but still both of the radio button stays not selected.

Note: This is read only light box
scheduler.Config.readonly_form = true;
scheduler.Config.dblclick_create = false;

Hi,
the bug is confirmed, radiobuttons loses its state in readonly form in IE(the same must be happening checkboxes as well)
You may try restoring selection manually, after lightbox is shownscheduler.attachEvent("onLightbox", function(id){ var value = scheduler.getEvent(id).event_type; scheduler.formSection("event_type").setValue(value); });