How to use the dhtmlxCalendar in the Lightbox

Hi Guys,
I have been trying to implement the dhtmlxScheduler as a form_block on the lightbox rather than the default time form_block that was built into it. I have managed to get it implemented by using the following form block (my form_block is not complete as of yet though…). I am using the method described in the 01_calendar_attach_to_input.html sample for the dhtmlxCalendar. The issue I am having is that the dhtmlxCalendar is appearing below the lightbox and above the dhtmlxScheduler, so I cannot use the dhtmlxCalendar because it is below the lightbox. Below is my form_block for the dhtmlxCalendar:

        scheduler.form_blocks["myFromDateToDate"] =
        {
            render:function(sns){
                return "<table style=\"width: 100%\" id=\"" + sns.ctrlId + "\"><td class=\"smallText\" style=\"width: 100%; text-align: left;\">From Date: <input type=\"text\" id=\"calInput1\" style=\"width: 200px; font-size:12px;\" readonly=\"true\" /></td></tr><tr><td style=\"text-align: right;\"><input type=\"text\" id=\"calInput2\" style=\"width: 200px; font-size:12px;\" readonly=\"true\" /></td></tr></table>";
                //return "<div></div>";
            },
            set_value:function(node,value,ev){
                if(cal1 == undefined)
                {
                    cal1 = new dhtmlxCalendarObject('calInput1');

                }
                if(cal2 == undefined)
                {
                    cal2 = new dhtmlxCalendarObject('calInput2');
                }
            },
            get_value:function(node,ev){

            },
            focus:function(A){
            }
        };

It still has a fair bit of work, such as closing the Calendar object if the user has exitted the lightbox using any method (saving its value on close into the user input as well).

Any advice too resolve this issue would be greatly appreciated. If a sample form_block is available that uses the dhtmlxCalendar rather than the time form_block, it would also be greatly appreciated.
Kind regards
Greg Goldberg

While we have not such form block for dhtmlxCalendar, there similar one can be checked at
samples/05_calendar/03_in_form.html

Is dhtmlxCalendar has any significant benefits other the above solution?

Hi Stanislav,
In other scenario’s, I guess the dhtmlxCalendar could be useful as a single input element as well, as you could assign deadlines to events, or other date values which may be required. As the build I generated uses whole day events (the time fields are hidden), which require no time input, it would be a preferred method.

I am happy to develop the form block, but was unable to get the calendar to display above the lightbox. I will attempt to follow the 05_calendar/03_in_form.html method and hopefully I can create one.
Thanks for the tip.
Kind regards
Greg