Form Clear Method Error...


I have a little problem with the clear method of the dhtmlxForm… I have a form with some imputs, a combo, and a couple of calendar controls… Whe I invoke the form’s clear method a javascript error apears and program execution stops…

I have found that when I use the calendar controls the form’s clear method fails, if I take them out of the form it works as expected…

Here is the error message:

Mensaje: ‘null’ is null or not an object
Línea: 788
Carácter: 487
Código: 0
URI: localhost/ltc/codebase/dhtmlx.js

Acoording to documentation, clear method clears items values for inputs, selects, radiogroups and checkboxes. It does not say anything about calendars… But should it give an error message and stop working?

Thanks for your help…


The method should work well for a calendar type.

Please provide any kind of sample or demo link to reconstruct an issue


I have the same issue here.

I can’t clear() a form that have a calendar control. Please provide a way to workaround this.


Please provide any kind of sample or demo link to reconstruct an issue


I’ve got the same problem, here’s the code sample generating an error.

main file code:



form structure xml (text.xml):

<?xml version="1.0" encoding="UTF-8"?>
	<item type="fieldset" label="Smth">
		<item type="block" width="600">
			<item type="settings" labelWidth="150" inputWidth="230"  />
			<item type="calendar" name="DateTo" label="Date to:" serverDateFormat="%Y-%m-%d %H:%i:%s" />
			<item type="button" name="Button_Update" value="Update" className="btnClass"/>

First clear() works fine, the second called inside event function returns error for no particular reason. Would be greatfull for some feedback on this manner.


The issue is confirmed.
We shall inform you when the fix will be ready.

Is there a resolution available for the issue?

I found something of a solution here:


Of course, it caused it’s own problems with Form and the Datastore.

Good luck,