Hello,
I have a strange problem that seems to be a bug.
Here's a simple test case.
I have a form.
The fields of the form are created through a DataSource.
I have three fields :
- "Date start" : type "date"
- "Flat field" : type "float"
- "Date end" : type "date"
Here's the problem : if I empty the "Date start" or "Date end" field and click on the button (which validates the form and then shows a message), the field resets to its original value during validation.
I have joined a diagram explaining the steps and the problem.
I'm using version 7.0RC2PowerEdition (Note : I cannot currently upgrade to version 8)
I tested on Firefox and Internet Explorer.
Console Logs :
"
17:42:24.998:INFO:Log:initialized
17:42:25.567:INFO:Log:isc.Page is loaded
"
Note : if I remove the "Flat field" from the DataSource, the problem disappears...
Thank you
I have a strange problem that seems to be a bug.
Here's a simple test case.
I have a form.
The fields of the form are created through a DataSource.
I have three fields :
- "Date start" : type "date"
- "Flat field" : type "float"
- "Date end" : type "date"
Here's the problem : if I empty the "Date start" or "Date end" field and click on the button (which validates the form and then shows a message), the field resets to its original value during validation.
I have joined a diagram explaining the steps and the problem.
Code:
isc.setAutoDraw(true);
var ds = isc.DataSource.create({
fields:[
{name: "0", title: "Date start", type: "date", required: false, useTextField: true, startRow: false, endRow: true,defaultValue: new Date(1228777200000)}
, {name: "1", title: "Flat field", required: false, startRow: true, endRow: true,type: "float",defaultValue: 250.0,width: 150,textAlign: "right" }
, {name: "2", title: "Date end", type: "date", required: false, useTextField: true, startRow: true, endRow: true,defaultValue: new Date(1287525600000)}
],clientOnly: true
});
var form = isc.DynamicForm.create({
validateOnChange: false,
dataSource: ds
});
isc.Button.create ({left: 250, click: function () {
if(!form.validate())
return;
alert ("Validated");
}
});
I tested on Firefox and Internet Explorer.
Console Logs :
"
17:42:24.998:INFO:Log:initialized
17:42:25.567:INFO:Log:isc.Page is loaded
"
Note : if I remove the "Flat field" from the DataSource, the problem disappears...
Thank you
Comment