Hi Isomorphic,
I can see this is fixed in v12.0p_2019-08-18 and SNAPSHOT_v12.1d_2019-08-18.
Thank you & Best regards
Blama
Announcement
Collapse
No announcement yet.
X
-
You should find this fixed in builds of 12.1 dated August 17. We'll port back to 12.0 shortly.
Leave a comment:
-
Hi Isomorphic,
yes, by "flickering" I meant the value first showing and then disappearing.
This is the only issue I saw. When applying a explicit default everything is fine IMHO, regardless of useTextField: true/false. My last sentence in #5 was an observation, not a bug report.
Best regards
Blama
Leave a comment:
-
We do see the value disappear in the online showcase, but not elsewhere - we'll look into that and get back to you.
We're not sure what you mean about flickering - do you just mean that you see the value appear once and then it disappears?
The default value of Today is applied at creation, to the useTextField: false item - so, it is fully expected that when we switch to useTextField:true automatically after creation, due to changes in item/form state, the textField is going to display the default from the item.
Leave a comment:
-
Hi Isomorphic,
I saw the docs change. It makes it way clearer, thank you.
W.r.t the DateItem change you made, I can see it in SNAPSHOT_v12.1d_2019-08-14 only, not in v12.0p_2019-08-14.
Also, in 12.1d it is now somewhat broken with the sample code from #1:- On click on "Try it" the date shows up for a very short time.
- Then it is hidden
- On click on "Toggle canEdit1" the default date (today) shows.
- On click on "Toggle canEdit1" again, the default date (today) is displayed read only.
If I explicitly set a default with {name: "nextShipment", defaultValue:"12/01/2019"} the default date (Dec, 1st) shows.
Best regards
Blama
Leave a comment:
-
We agree on both points - DateItem.useTextField was re-doc'd a week or so ago with some additional notes and links, and you should see useTextField switching on and off automatically according to the state of the item / its form as of builds dated August 14.
Leave a comment:
-
Hi Isomorphic,
thanks. Stupid mistake not to notice that the date is the current date.
I agree that the current date as default makes sense for a useTextField:false DateItem. I also understand that this does not support nulls.
This means that useTextField:false DateItem should most likely only be used with required="true" fields. IMHO it would be good if the docs mentioned this.
Also it would be good if a useTextField:true DateItem automatically switched to useTextField:false when in the following mode:- canEdit: false
- readOnlyDisplay:"static"
- disabled: false
Best regards
Blama
Leave a comment:
-
The problem here is actually just that the data you're viewing happens not to have a value in it's Next Shipment field - a picker-based DateItem will enforce a default value (Today), because they don't support a null representation. But a useTextField:true DateItem *does* support null values and will not enforce Today as a default value.
You can either set a defaultValue on the item, or you can use a record that has a value in that field.Last edited by Isomorphic; 4 Aug 2019, 22:07.
Leave a comment:
-
12.0p Bug with DateItem and useTextField:true with no data in DynamicForm
Hi Isomorphic,
please see this online sample (v12.0p_2019-08-01) where it seems that the data for a useTextField:true-DateItem is not displayed.
Testcase:
Code:isc.DynamicForm.create({ ID: "dynamicForm1", isGroup: true, groupTitle: "Form 1", canEdit: false, readOnlyDisplay:"static", dataSource: "supplyItem", width: 800, fields:[ {name: "header", type:"header", value:"Form 1"}, {name: "itemID"}, {name: "itemName"}, {name: "SKU"}, {name: "category"}, {name: "unitCost"}, {name: "units"}, {name: "inStock", labelAsTitle:true}, {name: "nextShipment"}, {name: "description", showIf:"dynamicForm1.getValue('description') != null"}, ] }); isc.DynamicForm.create({ ID: "dynamicForm2", canEdit: false, readOnlyDisplay:"static", dataSource: "supplyItem", width: 800, fields:[ {name: "header", type:"header", value:"Form 2"}, {name: "itemID"}, {name: "itemName"}, {name: "SKU"}, {name: "category"}, {name: "unitCost"}, {name: "units"}, {name: "inStock", labelAsTitle:true}, {name: "nextShipment", type:"date", useTextField:true}, {name: "description", showIf:"dynamicForm2.getValue('description') != null"}, ] }); isc.IButton.create({ ID: "toggleEditButton1", title: "Toggle canEdit1", click: "dynamicForm1.setCanEdit(!dynamicForm1.canEdit)" }); isc.IButton.create({ ID: "toggleEditButton2", title: "Toggle canEdit2", click: "dynamicForm2.setCanEdit(!dynamicForm2.canEdit)" }); isc.IButton.create({ ID:"printBtn", autoDraw: false, title: "Print Preview", click: "isc.Canvas.showPrintPreview([dynamicForm1, dynamicForm2])" }); isc.HStack.create({ ID: "buttons", height: 24, membersMargin: 10, members: [toggleEditButton1, toggleEditButton2, printBtn] }); isc.VLayout.create({ width: 800, membersMargin: 10, members: [dynamicForm1, dynamicForm2, buttons] }); dynamicForm1.fetchData({ fieldName: "SKU", operator: "equals", value: "90600" }); dynamicForm2.fetchData({ fieldName: "SKU", operator: "equals", value: "90600" });
BlamaTags: None
Leave a comment: