Hi,
I have a code snippet that creates a DynamicForm, with a TimeItem inside. And a ValuesManager to manage the DynamicForm. Below, there is a button that, when clicked, prints on the console the result of calling vm.valuesHaveChanged(). If I set the TimeItem canEdit property to false, the result of ValuesManager.valuesHaveChanged becomes inconsistent. It works ok with canEdit: true.
The code snippet is the following:
	In order to reproduce my problem follow these steps:
1- Click "Button" and check the console output. You will see that it prints 'valuesHaveChanged: false', meaning that the values have not changed.
2- Then double click on the time item. You cannot edit the value, and hence the value does not change. Click "Button" again. Now it prints 'valuesHaveChanged: true', but the values have not changed.
If you set canEdit: true in the TimeItem, the result of vm.valuesHaveChanged is as expected.
Browser: Google Chrome Version 47.0.2526.80 m
SmartClient Version v10.0p_2015-08-18 (2015-08-18)
					I have a code snippet that creates a DynamicForm, with a TimeItem inside. And a ValuesManager to manage the DynamicForm. Below, there is a button that, when clicked, prints on the console the result of calling vm.valuesHaveChanged(). If I set the TimeItem canEdit property to false, the result of ValuesManager.valuesHaveChanged becomes inconsistent. It works ok with canEdit: true.
The code snippet is the following:
Code:
	
	var form = isc.DynamicForm.create({
   fields: [
      {name: "time", type: "time", canEdit: false}
   ]
});
var vm = isc.ValuesManager.create({
   members: [form]
});
var button = isc.Button.create({
   title: "Button",
   action: function() {
      console.log("valuesHaveChanged: " + vm.valuesHaveChanged());
   }
});
form.setValue("time", new Date(1970, 0, 1, 11, 30, 0, 0));
vm.rememberValues();
isc.VLayout.create({
   width: 100,
   members: [form, button]
});
1- Click "Button" and check the console output. You will see that it prints 'valuesHaveChanged: false', meaning that the values have not changed.
2- Then double click on the time item. You cannot edit the value, and hence the value does not change. Click "Button" again. Now it prints 'valuesHaveChanged: true', but the values have not changed.
If you set canEdit: true in the TimeItem, the result of vm.valuesHaveChanged is as expected.
Browser: Google Chrome Version 47.0.2526.80 m
SmartClient Version v10.0p_2015-08-18 (2015-08-18)

Comment