B4J Question [ABMaterial] ABMDateTimePicker Not working inside Tab

Femi

New Member
Hi All,
Please ABMDateTimePicker is not showing the date selection control when inside a Tab. But it is working when directly on page cell. How can i resolve this?

Perhaps am missing something my code is:

B4X:
Dim tabs As ABMTabs
    tabs.Initialize(page, "tabs", "")

    '    create the tabs As ABMContainer.
    tabs.AddTab("tab1", "Data", BuildTabContainer("tab1"),3,3,3,12,12,12,True,True, "")

    '    add To row
    page.Cell(3,1).AddComponent(tabs)

Sub BuildTabContainer(id As String) As ABMContainer
    Dim Tabc As ABMContainer
    Tabc.Initialize(page, id, "tabpagewhite")   
   
    Tabc.AddRows(5,True,"").AddCells12(1,"")
    Tabc.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
   
    Dim inpt15 As ABMDateTimePicker
    'DateTime.DateFormat = "YYYY-MM-DD"
    Dim NewDate As Long = DateTime.Now
    'Log(NewDate)
    inpt15.Initialize(page, "inpt15", ABM.DATETIMEPICKER_TYPE_DATE, NewDate, "Date of Birth", "")
    inpt15.CancelText = "Back"
    inpt15.PickText = "OK"
    inpt15.TodayText = "Today"
    inpt15.Language = "en"
    inpt15.ReturnDateFormat = "YYYY-MM-DD"   ' <--- see demo source code For settings
    inpt15.ReturnTimeFormat = "HH:mm"        ' <--- see demo source code For settings
    inpt15.FirstDayOfWeek = 0

    Tabc.Cell(1,1).AddComponent(inpt15)
   
    Tabc.Refresh
    Return Tabc
End Sub
 

johnerikson

Active Member
Licensed User
Longtime User
Hi,
I have the same problem with ABMDateTimePicker not working inside the ModalSheet!
Hope response, Otherwise, I try with a Wish at ADMfeedback
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
There seems to be something off with the analysing routine of the bas files. The first time I ran the above code, it did not work (looking into the browser console quickly revealed the needed javascript library was missing). I closed the browser, stopped the app and restarted it. Now it did work in the browser as espected. Super weird as I thought I had that one covered in 2.00. Will need some more investigation. Remember, when everything fails, use the page.Needs... properties in BuildPage() as a workaround for now. But I definitely want to get rid of this problem so I'll work on it.
 
Upvote 0

mindful

Active Member
Licensed User
Maybe the same goes for a problem I had with social login (the problem is reported in feedback app). If I didn't put page.Needs.... the social login didn't show. Glad to here that you figured out ;)
 
Upvote 0
Top