Multiple Bugs in Calendar

For some reason the calendar is acting buggy. It doesn’t respond to form.clear() function and the dataprocessor generates some sort of error when handling requests. The following is client side code. After that there will be my serverside code. Then finally the error log.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Add Course</title>
<!-- dhtmlxForms -->
<link rel="stylesheet" type="text/css" href="../includes/dhtmlxSuite/dhtmlxForm/codebase/skins/dhtmlxform_dhx_skyblue.css" />
<script src="../includes/dhtmlxSuite/dhtmlxForm/codebase/dhtmlxcommon.js "></script>
<script src="../includes/dhtmlxSuite/dhtmlxForm/codebase/dhtmlxform.js "></script>
<!-- dhtmlxConnector & dhtmlxDataprocessor -->
<script src="../includes/dhtmlxSuite/dhtmlxConnector/codebase/connector.js"></script>
<script src="../includes/dhtmlxSuite/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
<!-- dhtmlxDataview -->
<script src="../includes/dhtmlxSuite/dhtmlxDataView/codebase/dhtmlxdataview.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="../includes/dhtmlxSuite/dhtmlxDataView/codebase/dhtmlxdataview.css" />
<!-- dhtmlxCalendar -->
<script src="../includes/dhtmlxSuite/dhtmlxForm/codebase/ext/dhtmlxform_item_calendar.js"></script>
<script src="../includes/dhtmlxSuite/dhtmlxCalendar/codebase/dhtmlxcalendar.js"></script>
<link rel="stylesheet" type="text/css" href="../includes/dhtmlxSuite/dhtmlxCalendar/codebase/dhtmlxcalendar.css" />
<link rel="stylesheet" type="text/css" href="../includes/dhtmlxSuite/dhtmlxCalendar/codebase/skins/dhtmlxcalendar_dhx_skyblue.css" />
<!-- Initialization of dhtmlxComponents -->
<script type="text/javascript">
function doOnLoad(){
	fc_addCourse = [
		{type: "fieldset",name:"fldstAddCourse", label: "Add Course", list:[
				{type: "input", name: "name", label:"Name of the course", validate: "NotEmpty"},
				{type: "input", name: "points", label: "Credit point value", validate: "ValidNumeric"},
				{type: "input", name: "hours", label: "Hours", validate: "ValidNumeric"},
				{type: "calendar", dateFormat: "%Y-%m-%d", name: "start", label: "Start date", readonly: true, validate: "ValidDate", calendarPosition: "right"},
				{type: "calendar", dateFormat: "%Y-%m-%d", name: "end", label: "End date", readonly: true, validate: "ValidDate", calendarPosition: "right"},
     			{type: "input", name: "interval", label: "interval"},
     			{type: "input", name: "type", label: "Type of studies", validate: "NotEmpty"},
     			{type: "input", name: "description", label: "Description of the course", validate: "NotEmpty"},
     			{type: "button", name: "save", value: "Save"},
     			{type: "button", name: "reset", value: "Reset"},
     			{type: "button", name: "cancel", value: "Cancel"}
  	var formAddCourse = new dhtmlXForm("fc_formAddCourse", fc_addCourse);
  	var dpFormAddCourse = new dataProcessor("../control/ctrlAddCourse.php");
  	formAddCourse.attachEvent("onButtonClick", function(id){
		if (id=="save"){
			alert("Button "+id+" was pressed!!!");;
		} else if (id=="reset"){
		} else if (id=="cancel"){
			alert("Button "+id+" was pressed!!!");

  	var viewAddCourse = new dhtmlXDataView({
		drag: true,
			template:"<b>Name: </b>#name#
<b>Description: </b>#description#",
			height: 35

<body onload="doOnLoad()">
<div id="fc_formAddCourse"></div>

<div id="data_container" style="width:596px;height:396px;"></div>

now the server side code (note: the code executed when is_select_mode() returns true. does not have “start” or “end”. If it did the dataview would not load.



$conn = mysql_connect("localhost","root","root");
//Connect to the database
$dataCourse = new DataViewConnector($conn, "MySQL"); // replaced    $data = new DataViewConnector($conn);
$dataCourse->enable_log("logDataCourse.txt", true); // create a log file

    if ($dataCourse->is_select_mode()){
    	//code for loading data
        $dataCourse->render_table("course", "id", "name, points, hours");//table name, ID, list of properties
    }else{ //code for other operations - i.e. update/insert/delete
        $dataCourse->render_table("course", "id", "name, points, hours, start, end, interval, type, description");//table name, ID, list of properties

Finally here’s the error log. Notice that the dates are in long format?

Log started, 06/09/2011 01:09:42

While there is no edit mode mark, POST parameters similar to edit mode detected. \n Switching to edit mode ( to disable behavior remove POST[ids]

While there is no edit mode mark, POST parameters similar to edit mode detected. \n Switching to edit mode ( to disable behavior remove POST[ids]

DataProcessor object initialized
1315302139582_name => Course 3
1315302139582_points => 12
1315302139582_hours => 8
1315302139582_start => Wed Sep 07 2011 13:13:00 GMT+0300 (EET)
1315302139582_end => Fri Sep 30 2011 13:13:00 GMT+0300 (EET)
1315302139582_interval => some interval
1315302139582_type => some typ
1315302139582_description => new description
1315302139582_!nativeeditor_status => inserted
ids => 1315302139582

Row data [1315302139582]
name => Course 3
points => 12
hours => 8
start => Wed Sep 07 2011 13:13:00 GMT+0300 (EET)
end => Fri Sep 30 2011 13:13:00 GMT+0300 (EET)
interval => some interval
type => some typ
description => new description
!nativeeditor_status => inserted

INSERT INTO course(name,points,hours,start,end,interval,type,description) VALUES (‘Course 3’,‘12’,‘8’,‘Wed Sep 07 2011 13:13:00 GMT+0300 (EET)’,‘Fri Sep 30 2011 13:13:00 GMT+0300 (EET)’,‘some interval’,‘some typ’,‘new description’)

Edit operation finished
0 => action:error; sid:1315302139582; tid:1315302139582;

Done in 0.0074620246887207s

I know that it’s a lot of code to look at but I any help that you could lend would be great!!! :slight_smile:

We have fixed several bugs in form and calendar. Please try to use attached libraries instead of the originals. (29.6 KB)


I stumbled on this thread because I was having an issue with the Calendar control in IE after upgrading to dhtmlxSuite 2011 Rel.1 (DHTMLX 3.0)

The script library (above) fixed that problem… however, I encountered at least one other issue related to the 3.0 libraries. For example, in IE, calling the .selectOption function of a combo box that is contained in a Closed Accordion item was causing an error:

I was able to fix that problem by commenting out the line in the javascript that sets focus (it wasn’t present in version 2.6) … however, finding this thread got me wondering if there might be somewhere I can download all the latest (fixed) library scripts?