Hi,
I am sure that this is definitely some mistake that I have done in my code. As am I am newbie just need some help.
In the ABMDateTimePicker section in the demo application hosted at http://abmaterial.com is working fine, but when I try to do the same in my application, the OK button is displayed outside the ABMDateTime Picker window. Can anyone point me where I am going wrong.
Here are the pictures of what I am trying to explain.
The correct one in the ABMMaterial Demo application
The problem in my application
Here is the relevant code that I have used
Any help will be appreciated
I am sure that this is definitely some mistake that I have done in my code. As am I am newbie just need some help.
In the ABMDateTimePicker section in the demo application hosted at http://abmaterial.com is working fine, but when I try to do the same in my application, the OK button is displayed outside the ABMDateTime Picker window. Can anyone point me where I am going wrong.
Here are the pictures of what I am trying to explain.
The correct one in the ABMMaterial Demo application
The problem in my application
Here is the relevant code that I have used
B4X:
public Sub BuildPage()
' initialize the theme
BuildTheme
' initialize this page using our theme
page.InitializeWithTheme(Name, "/ws/" & ABMShared.AppName & "/" & Name, False, ABMShared.SessionMaxInactiveIntervalSeconds, theme)
page.ShowLoader=True
page.PageHTMLName = "AddCustomer.html"
page.PageTitle = ""
page.PageDescription = ""
page.PageKeywords = ""
page.PageSiteMapPriority = ""
page.PageSiteMapFrequency = ABM.SITEMAP_FREQ_YEARLY
page.ShowConnectedIndicator = True
' adding a navigation bar
ABMShared.BuildNavigationBar(page, "Add Customer","../images/logo.png", "", "", "")
'page.DebugConsoleEnable(True,250)
' create the page grid
page.AddRows(1,True, "").AddCells12(1,"centre")
page.AddRows(2,True, "").AddCellsOS(2,0,0,0,6,6,6,"")
page.AddRows(1,True, "").AddCells12(1,"")
page.AddRows(1,True, "").AddCellsOS(2,0,0,0,6,6,6,"")
page.BuildGrid 'IMPORTANT once you loaded the complete grid AND before you start adding components
End Sub
public Sub ConnectPage()
' connecting the navigation bar
ABMShared.ConnectNavigationBar(page)
' add your own components
Dim inp2 As ABMInput
inp2.Initialize(page, "inp2", ABM.INPUT_TEXT, "Last Name", False, "input")
inp2.PlaceHolderText = "Last name"
page.Cell(2,2).AddComponent(inp2)
Dim myDtPicker As ABMDateTimePicker
DateTime.DateFormat = "yyyy-MM-dd"
myDtPicker.Initialize(page,"myDtPicker",ABM.DATETIMEPICKER_TYPE_DATE,DateTime.Now,"Date of birth","picker")
myDtPicker.Language = "en"
myDtPicker.CancelText = "Cancel"
myDtPicker.PickText = "Ok"
myDtPicker.TodayText = "Today"
' myDtPicker.ClearText = "Clear"
myDtPicker.FirstDayOfWeek = ABM.FIRSTDAYOFWEEK_MONDAY
myDtPicker.ReturnDateFormat = "YYYY-MM-DD"
myDtPicker.ReturnTimeFormat = ""
page.Cell(3,1).AddComponent(myDtPicker)
' refresh the page
page.Refresh
' Tell the browser we finished loading
page.FinishedLoading
' restoring the navigation bar position
page.RestoreNavigationBarPosition
End Sub
Any help will be appreciated