Form Clear Method Error...

Hello,

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…

Rafa…

The method should work well for a calendar type.

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

Hello!

I have the same issue here.

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

Elieser

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

Hi!

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

main file code:

[code]

[/code]

form structure xml (text.xml):

<?xml version="1.0" encoding="UTF-8"?>
<items>
	<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"/>
		</item>
	</item>
</items> 

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.

Adam

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:

viewtopic.php?f=7&t=20250&p=64268&hilit=calendar+clear#p64268

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

Good luck,
Rob