cancel
Showing results for 
Search instead for 
Did you mean: 

MDK Application not showing two date picker control side by side in page, what to do?

Sourabh1
Explorer
0 Kudos
224

Hello,

I am currently developing an application using the SAP Mobile Development Kit (MDK). I have encountered an issue where I am unable to display two date picker controls side by side on the same page.

Here are the details of my setup:

MDK Version: 24.7
Device/Platform: Web, Android
Steps to Reproduce:
1)Added two date picker controls to the same page.
2)Tried using "NumberOfColumns" property of FormCellControl as 2 to show two date side by side.
3)In cloud studio it showing two date shows side by side.
4)Despite these efforts, the date pickers still appear one below the other instead of side by side in both web as well as android.

Page Code : 

{
    "Controls": [
        {
            "FilterFeedbackBar": {
                "ShowAllFilters": false,
                "_Type": "Control.Type.FilterFeedbackBar"
            },
            "_Type": "Control.Type.SectionedTable",
            "_Name": "SectionedTable0",
            "Sections": [
                {
                    "Visible": true,
                    "EmptySection": {
                        "FooterVisible": false
                    },
                    "Separators": {
                        "TopSectionSeparator": false,
                        "BottomSectionSeparator": true,
                        "HeaderSeparator": true,
                        "FooterSeparator": true,
                        "ControlSeparator": true
                    },
                    "_Type": "Section.Type.FormCell",
                    "_Name": "SectionFormCell1",
                    "Controls": [
                        {
                            "Value": "Enter Date",
                            "_Type": "Control.Type.FormCell.DatePicker",
                            "_Name": "FormCellDatePicker0",
                            "IsVisible": true,
                            "Separator": true,
                            "Caption": "Start",
                            "IsEditable": true,
                            "Mode": "Date"
                        },
                        {
                            "Value": "Enter Date",
                            "_Type": "Control.Type.FormCell.DatePicker",
                            "_Name": "FormCellDatePicker1",
                            "IsVisible": true,
                            "Separator": true,
                            "Caption": "End",
                            "IsEditable": true,
                            "Mode": "Date"
                        }
                    ],
                    "Layout": {
                        "NumberOfColumns": 2
                    }
                },
                {
                    "_Type": "Section.Type.ButtonTable",
                    "_Name": "SectionButtonTable0",
                    "Visible": true,
                    "EmptySection": {
                        "FooterVisible": false
                    },
                    "Separators": {
                        "TopSectionSeparator": false,
                        "BottomSectionSeparator": true,
                        "HeaderSeparator": true,
                        "FooterSeparator": true,
                        "ControlSeparator": true
                    },
                    "Buttons": [
                        {
                            "_Type": "ButtonTable.Type.Button",
                            "_Name": "ButtonTableTypeButton0",
                            "Title": "Submit",
                            "Alignment": "Center",
                            "ButtonType": "Primary",
                            "Semantic": "Tint",
                            "ImagePosition": "Leading",
                            "FullWidth": true,
                            "Visible": true,
                            "Enabled": true
                        }
                    ],
                    "Layout": {
                        "LayoutType": "Vertical",
                        "HorizontalAlignment": "Leading"
                    }
                }
            ]
        }
    ],
    "_Type": "Page",
    "_Name": "Test",
    "Caption": "Test",
    "PrefersLargeCaption": true
}

Has anyone faced a similar issue or can provide guidance on how to resolve this? Any help or suggestions would be greatly appreciated!

Thank you.From cell control.pngWeb View.pngAndroid View.png

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert

@Sourabh1 

Supporting Multiple Columns in a Form Cell Section is applicable on MDK mobile clients only, not web.

Please note below behavior of the NumberOfColumns property

  • On iOS, this setting is only valid in regular mode (iPad or large iPhone Landscape). In compact mode it will always be set to 1 column.
  • On Android, this setting is only valid when current screen width is larger than 600dp. When the current screen width (e.g. in phone portrait mode) is less than 600dp, it will always be set to 1 column.

What you see in the Page editor of the Business Application Studio is a graphical representation of how the UI may look on clients.What you see on the Web and Android is the expected behavior as described above.

Answers (0)