Problem with form clear function

Hi,

 i constructed a form with input, calendar and checkboxes when i am using the clear function as a event that clears the input and checkboxes not calendar, and the elements created after the calendar are not cleared when the form clear function is called ....

Hello

Could you please attach demo to reproduce issue?

here is my code i am unable to attach the file

dhtmlx.image_path='./codebase/imgs/';

var formData = [
			{ type:"fieldset" , name:"Section1_3PP_Products", label:"Section1", width:320, labelLeft:"0", labelTop:"0", inputLeft:"0", inputTop:"-10", position:"absolute", list:[
					{ type:"combo" , name:"VENDOR_ID", label:"Vendor", labelWidth:"130", labelHeight:"15", labelAlign:"right", inputWidth:"130", inputHeight:"15", position:"label-left"  },
					{ type:"input" , name:"VENDORPARTNUMBER", label:"Vendor Part Number", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"THREEPPNAME", label:"3PP Name", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"VERSIONNO", label:"3PP Version", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"VERSIONUPDATE", label:"3PP Version Update", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"ECCNEU", label:"ECCN EU", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"ECCNUS", label:"ECCN US", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"CCATS", label:"CCATS", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"ENCRYPTIONALGORITHM", label:"Encryption Algorithm", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"ERICSSONPARTNUMBER", label:"Ericsson Part Number", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"DOWNLOADLINK", label:"DownLoad Link", rows:"3", labelWidth:"130", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"label" , name:"dummy1", labelHeight:"85", position:""  }
					
			]  },
			{ type:"fieldset" , name:"Section2_3PP_Products", label:"Section2", width:650, labelAlign:"left", labelLeft:"-10", labelTop:"-10", inputLeft:"340", inputTop:"-10", position:"absolute", list:[
					{ type:"input" , name:"RSTATE", label:"RState", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"ERICSSONLICENSEPRODUCTNUMBER", label:"Ericsson License Product Number", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"RSTATE1", label:"RState1", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },
					{ type:"input" , name:"AGO", label:"AGO", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",validate:"NotEmpty", position:""  },	
					{ type:"calendar" , name:"RELEASEDATE", label:"Release Date", dateFormat:"%Y-%m-%d", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",readonly:true, position:""  },
					{ type:"calendar" , name:"ENDOFLIFE", label:"End Of Life", dateFormat:"%Y-%m-%d", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",readonly:true, position:""  },
					{ type:"calendar" , name:"LASTORDERDATE", label:"Last Order Date", dateFormat:"%Y-%m-%d", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",readonly:true, position:""  },
					{ type:"calendar" , name:"LASTSERVICEDATE", label:"Last Service Date", dateFormat:"%Y-%m-%d", labelWidth:"230", labelHeight:"18", labelAlign:"right", inputWidth:"130", inputHeight:"15",readonly:true, position:""  },
					{ type:"multiselect" , name:"PLATFORM", label:"Platform", labelWidth:"100", labelHeight:"20", labelAlign:"right", inputWidth:"120", inputHeight:"110", labelLeft:"380", labelTop:"0", inputLeft:"500", inputTop:"0", position:"absolute", options:[
						{ value:"Independent", text:"Independent" },
						{ value:"N/A", text:"N/A" },
						{ value:"HP-UX", text:"HP-UX" },                                                                                                                                                                                                                                           		
						{ value:"PC/Linux", text:"PC/Linux" },                                                                                                                                                                                                                                            		
						{ value:"PC/Windows", text:"PC/Windows" },                                                                                                                                                                                                                                            		
						{ value:"Sun/Solaris", text:"Sun/Solaris" }                                                                                                                                                                                                                                           		
					]  },
                		
					{ type:"multiselect" , name:"LICENSEKEY", label:"Licence Key", labelWidth:"100", labelHeight:"20", labelAlign:"right", inputWidth:"120", inputHeight:"60", labelLeft:"380", labelTop:"120", inputLeft:"500", inputTop:"120", position:"absolute", options:[
                		{ value:"Yes", text:"Yes" },
                		{ value:"No", text:"No" },
                		{ value:"N/A", text:"N/A" }
                	]  }
			]  },
			{ type:"fieldset" , name:"Section3_3PP_Products", label:"Section3", width:650, labelAlign:"left", labelLeft:"-10", labelTop:"-10", inputLeft:"340", inputTop:"220", position:"absolute", list:[
					{ type:"multiselect" , name:"TYPEOFPRODUCT", label:"Type Of Product", labelWidth:"120", labelHeight:"20", labelAlign:"left", inputWidth:"120", inputHeight:"75", position:"label-top", options:[
                        { value:"HardWare", text:"HardWare" },
                     	{ value:"Licence", text:"Licence" },
                        { value:"Mediakit", text:"Mediakit" },                                                                                                                                                                                                                                           		
                        { value:"Software", text:"Software" },                                                                                                                                                                                                                                            		
                        { value:"Support", text:"Support" },                                                                                                                                                                                                                                            		                                                                                                                                                                                                                                           		
                    ]  },
                    { type:"multiselect" , name:"GENERICKEY", label:"Generic Key", labelWidth:"100", labelHeight:"20", labelAlign:"left", inputWidth:"120", inputHeight:"75", labelLeft:"140", labelTop:"0", inputLeft:"140", inputTop:"24", position:"absolute", options:[
							{ value:"Yes", text:"Yes" },
							{ value:"No", text:"No" },
							{ value:"N/A", text:"N/A" }
					]  },                                                                                                                                                                                                                                                                                       		
					{ type:"checkbox" , name:"ERICSSONUSINTERNALLYDEVELOPEDSW", label:"Ericsson US Internally Developed SW", position:"label-left"},
					{ type:"checkbox" , name:"SUPPORTFROMVENDOR", label:"Support from Vendor", position:"label-left"  },
					{ type:"checkbox" , name:"COMMUNICATIONPROTOCOL", label:"Communication Protocol", labelLeft:"160", labelTop:"125", inputLeft:"310", inputTop:"127", position:"absolute"},
					{ type:"input" , name:"OPERATINGSYSTEM", label:"Operating System", labelWidth:"160", labelHeight:"18", labelAlign:"right", inputWidth:"140", inputHeight:"15", labelLeft:"290", labelTop:"-10", inputLeft:"460", inputTop:"-10",validate:"NotEmpty", position:"absolute"  },
					{ type:"input" , name:"COUNTRYOFORIGIN", label:"Country Of Origin", labelWidth:"160", labelHeight:"18", labelAlign:"right", inputWidth:"140", inputHeight:"15", labelLeft:"290", labelTop:"20", inputLeft:"460", inputTop:"20",validate:"NotEmpty", position:"absolute"  },
					{ type:"input" , name:"LICENSEKEYPARAMETERS", label:"License Key Parameters", labelWidth:"160", labelHeight:"18", labelAlign:"right", inputWidth:"140", inputHeight:"15", labelLeft:"290", labelTop:"50", inputLeft:"460", inputTop:"50",validate:"NotEmpty", position:"absolute"  },
					{ type:"input" , name:"TOOLS", label:"Tools", rows:"3", labelWidth:"80", labelHeight:"18", labelAlign:"right", inputWidth:"140", inputHeight:"50", labelLeft:"350", labelTop:"90", inputLeft:"460", inputTop:"90",validate:"NotEmpty", position:"absolute"  }
			]}			                                                                                                                                                                                       		
			
		];

		var form_3PP_Products = new dhtmlXForm("Form1",formData);
		form_3PP_Products.setFontSize('11px');
		
		form_3PP_Products.load('Form3PPProducts.do');
		var dp_3PP=new dataProcessor('Form3PPProducts.do');
		dp_3PP.init(form_3PP_Products);
		
		
		var ven_Combo = form_3PP_Products.getCombo("VENDOR_ID");
		ven_Combo.loadXML("VendorCombo.do");

var form2 = [
{ type:“button” , name:“add”, value:“Add”, position:“” },
{ type:“newcolumn” , position:“” },
{ type:“button” , name:“update”, value:“Update”, position:“” },
{ type:“newcolumn” , position:“” },
{ type:“button” , name:“save”, value:“Save”, position:“” },
{ type:“newcolumn” , position:“” },
{ type:“button” , name:“prev”, value:“Prev”, position:“” },
{ type:“newcolumn” , position:“” },
{ type:“button” , name:“next”, value:“Next”, position:“” }
];

		var form_button = new dhtmlXForm("Form2",form2);
		form_button.setFontSize('11px');		
				

		
		form_button.attachEvent("onButtonClick", function(id){
			if(id=='add'){

				form_3PP_Products.clear();
			}
			else if(id=='update'){
				if(form_3PP_Products.validate()){
					form_3PP_Products.save();
					alert('Updated');
				}	
			}
			else if(id=='save'){
				if(form_3PP_Products.validate()){
					form_3PP_Products.save();
					alert('Inserted');
				}	
			}
			else if(id=='next'){
	
			}
			else if(id=='prev'){
			
			}
		});		
			
		
</script>


some one tell me how to clear the form with calendar component sample is given in above post

Hi

please attach your dhtmlxform.js

i have attached the dhtmlxform.js and dhtmlxform_item_calendar.js
dhtmlxform.zip (17.6 KB)

hm, seems like attached js are ok.
could you please provide complete demo (including all corresponding js/css files) or direct link to reproduce issue?

(you also can send demo/link to support at dhtmlx dot com)