Thanks - my bad indeed.
Announcement
Collapse
No announcement yet.
X
-
This code is invalid because you are providing an actual instance of LayoutSpacer as a default for the DateChooser class. That means all instances of DateChooser that are created try to share the same, single LayoutSpacer.
You can correct your code by either passing in just properties for the LayoutSpacer - a plain JavaScript object with _constructor:”LayoutSpacer” - or just using the extraSpace property to add space instead (since you just want a fixed space of 60).
Leave a comment:
-
DateChooser skinning issue
Hi,
I am skinning DateChooser control, and as part of skinning I'm setting the buttonLayoutControls and adding a spacer between the Cancel and Today buttons.
This works nicely as long as I have only one date control in my form.
When my form has two date controls or a DateRange control for that matter, a strange thing happens - when opening the date chooser of each control for the first time or even several times in sequence, everything is OK, but when opening the first date chooser after opening the second date chooser, the spacer seems to get 'lost'.
Here is simple code snippet to reproduce the issue:
The sequence to reproduce the issue is:Code:isc.DateChooser.addProperties({ buttonLayoutControls: [ "cancelButton", isc.LayoutSpacer.create({ width: 60 }), "todayButton" ] }); isc.DynamicForm.create({ ID: "form", width: 500, titleOrientation: "top", dataSource: "worldDS", items: [ { editorType: "DateRangeItem", allowRelativeDates: true }, ] });
1. open first date chooser - everything looks right (see first image below).
2. click Cancel and open the second date chooser - everything still looks right.
3. click Cancel and open the first date chooser again - the spacer has disappeared (see second image below)
I am using SmartClient build 12.0p 2019-12-04 but the problem is reproduced also with latest build in your showcase page (12.0p 2020-01-12)
Thanks for looking into this.
GilTags: None
Leave a comment: