not been able to make a cell a calendar type

i have added



    



    

            



the configuration for the grid is:

mygrid = new dhtmlXGridObject(‘gridbox’);

mygrid.setImagePath(“<?=BASEURL?>fw_headers/js/dhtmlxgrid/codebase/imgs/”);

mygrid.setHeader(’<?= LBL_START_DATE ?>,<?= LBL_BUS_ROUTE_FROM ?>,<?=LBL_STOP_FROM?>,<?=LBL_BUS_ROUTE_FROM?>,<?=LBL_STOP_TO?>,<?=LBL_RETOUR?>,<?=LBL_DIRECTION?>’);

mygrid.setInitWidths(“100,100,100,100,100,100,100”);

mygrid.setColAlign(“center,center,center,center,center,center,center”);

mygrid.setColTypes(“dhxCalendarA,co,co,co,co,ch,ch”);

mygrid.setColSorting(“str,str,str,str,str,str,str”);

mygrid.enableMultiselect(true);

mygrid.enableAlterCss(“even”,“uneven”);

mygrid.enableAutoHeigth(true);

mygrid.init();

mygrid.setOnEditCellHandler(doOnCellEdit);

mygrid.setSkin(“light”);

mygrid.loadXML("<?php echo BASEURL; ?>/xml_grids/booking_persons.xml");

mygrid.setSizes();



i have also tried with calendar instead of dhxCalendarA. Yet i get this error aeditor has no properties

_fillRow(tr, [" ", " add route ", " add stop “, 4 more…])dhtmlxgrid.js (line 3624)

_addRow(“new1”, [” ", " add route ", " add stop “, 4 more…], 0)dhtmlxgrid.js (line 3707)

addRow(“new1”, [” ", " add route ", " add stop “, 4 more…], 0)dhtmlxgrid.js (line 3551)

addRow(“new1”, [” ", " add route ", " add stop ", 4 more…], 0, 0, undefined, undefined)dhtmlxtreegrid.js (line 596)

onclick(click clientX=0, clientY=0)managing_persons# (line 1)

[Break on this error] aeditor.setValue(val) , when a try adding a row :

i do this with : Add a new row

The code which you are using is correct, and must work without problems.
Attached sample uses the same code for initialization, and the same code for row adding and works correctly.

Please be sure that
    dhtmlxgrid/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js
really exists. There was incorrect build available some time ago, which missed this file ( it it missed - you can use one from attached sample )

1213376823.zip (100 KB)

I cannot get this working either.  Their is absolutely no documentation on getting this working.  The sample you provided does not work for me.


The error is in dhtmlxgrid_excell_calendar.js.  The error is :



Microsoft JScript runtime error: Object expected



and happens with the following code :



_grid_calendar_init()

I cannot get this working either.
Sample attached to previous reply was tested in all common browser ( IE, FF, Opera, Safari ) - and works correctly.
Which browser you are using?


>>Their is absolutely no documentation on getting this working.
All that need to be done
a) necessary column type set ( dhxCalendar in case of dhtmlxCalendar , or calendar in case of YUI calendar )
b) necessary js files included
    in case of dhxCalendar
       dhtmlxgrid/codebase/excells/dhtmlxgrid_excell_dhxcalendar.js
       dhtmlxcalendar/codebase/dhtmlxcalendar.js

    in case of calendar
       dhtmlxgrid/codebase/excells/dhtmlxgrid_excell_calendar.js
       set relative path to codebase
      

>>The error is in dhtmlxgrid_excell_calendar.js.  The error is :
Please be sure that you defined correct path to codebase in _js_prefix variable ( it is necessary to load other used YUI files )


I’ve placed the dhtmlX code in {webroot}/dhtmlx/



That folder has subfolders calendar which contains YAHOO.js and other necessary calendar stuff.  Their is also a subfolder excells, which contains the dhtmlxgrid_excell_calendar.js file.



I set







Now, again, there is no documentation.  I’m assuming the prefix must be for loading from the excells subfolder and that the calendar folder is hardcoded.  Am I wrong?  If I am, where should the _css_prefix and _js_prefix variable point to?


Ok, I’ve FINALLY figured this out.  The prefix’s are used for add the includes via and HTML, so the path to the files from the {webroot} are needed.



Now, another problem, the calendar allows changing month by month, but you cannot change years.  The dhxCalendarA type allows changing years (although it’s not intuitive) but has no way to change the months.  Are there other calendar types that allow you to change both the month and the year?

Now, another problem, the calendar allows changing month by month, but
you cannot change years.  The dhxCalendarA type allows changing years
(although it’s not intuitive) but has no way to change the months.

In case of “calendar” excell we are limited to functionality of YUI calendar - it possible to enable any modes of it, but as far as I can see it doesn’t allow a way to change current month, except of previous|next buttons.

The dhxCalendar allows selection month by next|previous button and direct selection of year, basically it possible to enable direct month selection ( in same manner as current year selection implementation )

Updated js file for dhxCalendar excell attached.

dhtmlxgrid_excell_dhxcalendar.zip (1.78 KB)