B4J Question [SOLVED] [ABMaterial] Datetimepicker not working

John Naylor

Active Member
Licensed User
Longtime User
OK I'm tired and probably doing something stupidly wrong here.

If I use this code on my homepage I get a working ABMDatetimepicker....


B4X:
Sub ConnectPage()


    ' ConnectNavigationBar2 is purposely built for public pages... It does not require a login to view
    ABMShared.ConnectNavigationBar2(page,  "Home", "Home", "Home",  Not(ws.Session.GetAttribute2("IsAuthorized", "") = ""))

    Dim ABMGenPurchaseOrdersdate As ABMDateTimePicker = ABMShared.BuildDatePicker (page,"dpicker",ABM.DATETIMEPICKER_TYPE_DATE,0,"PO Date","")
    page.Cell(2,2).AddComponent(ABMGenPurchaseOrdersdate)

but when I use this on a modalsheet it doesn't work....

B4X:
    '║ 10,1                                                                                                                              ║
    '╚═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCells12(1,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCellsOS(2,0,0,0,6,6,6,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(2,True,"").AddCells12(1,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCellsOS(2,0,0,0,6,6,6,"").AddCellsOS(4,0,0,0,12,6,6,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCells12(1,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCellsOS(2,0,0,0,12,12,6,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(1,True,"").AddCellsOS(4,0,0,0,6,3,3,"")
    ABMGenPurchaseOrdersModal.Content.AddRows(2,True,"").AddCells12(1,"")
    ABMGenPurchaseOrdersModal.Content.BuildGrid ' IMPORTANT!
#End Region

    Dim ABMGenPurchaseOrdersTitleMessage As ABMLabel
    ABMGenPurchaseOrdersTitleMessage.Initialize(page, "ABMGenPurchaseOrdersTitleMessage", "Enter all fields for this order - PO Number will be generated on save" , ABM.SIZE_PARAGRAPH, False, "")
    ABMGenPurchaseOrdersTitleMessage.IsBlockQuote = True
    ABMGenPurchaseOrdersModal.Content.CellR(0,1).AddComponent(ABMGenPurchaseOrdersTitleMessage)

    Dim Seperator As ABMDivider
    Seperator.Initialize(page,"Seperator","")
    ABMGenPurchaseOrdersModal.Content.Cell(1,1).AddComponent(Seperator)


    Dim ABMGenPurchaseOrdersdate As ABMDateTimePicker = ABMShared.BuildDatePicker (page,"dpicker",ABM.DATETIMEPICKER_TYPE_DATE,0,"PO Date","")
    ABMGenPurchaseOrdersModal.Content.Cell(2,1).AddComponent(ABMGenPurchaseOrdersdate)

On the former I get a picker as per usual, on the latter I get something that seems to want to work but the usual picker pop up doesn't appear.

Any ideas?
 

John Naylor

Active Member
Licensed User
Longtime User
Absolutely not needed! Such cases can only make my libs better for everyone. I'm still a bit puzzled why ABM doesn't pick up you are using those components... ?

Too late buddy you have a little beer money sent over. Seriously between you, @Erel, @Harris and all the other amazing people here a beer is the least I can do. What I'm working on right now is a warehouse management system for one of my clients which will ultimately lead in to a very large control system for their clients too (I can't say what we're controlling because of NDA's). Sufficient to say our clients are the biggest in the world and they are already itching for what we are doing (Apple, TDK, Sony Ericsson etc). B4J, B4Xpages, and ABMaterial are making this happen software wise. We're on an 18 month development plan (Software, electronics, mechanics) and when it comes off the profits will be unreal. I shall be making sizeable donations to those who have helped pull this off. For now a beer and a massive thank you are all you get ;-)

*Happy to supply source code for the page in question BTW and any other parts you may need to track down the issue.
 
Last edited:
Upvote 0

Harris

Expert
Licensed User
Longtime User
Absolutely not needed! Such cases can only make my libs better for everyone. I'm still a bit puzzled why ABM doesn't pick up you are using those components... ?
Double for me, no need. I was wondering why it didn't include required in the needs... The only difference I see is that the datepicker was inited in the ABMShared - rather than the page it was used on. However, it was declared on the page where to be used... Beats me...
 
Upvote 0

John Naylor

Active Member
Licensed User
Longtime User
Got me too pal. Literally every other page I've written works like a dream but this one doesn't.

If you won't take a beer now, well speak with Alain about my mid term future developments.
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
We're on an 18 month development plan (Software, electronics, mechanics) and when it comes off the profits will be unreal.
Hey, if you need a contract developer, I am available.
B4A and B4J (ABM) am expert in...
I have created some funky / complex systems in both to date (over many years).
Thanks
 
Upvote 0

John Naylor

Active Member
Licensed User
Longtime User
Hey, if you need a contract developer, I am available.
B4A and B4J (ABM) am expert in...
I have created some funky / complex systems in both to date (over many years).
Thanks
Being in Canada you're also close enough ideally placed to liase with our biggest. Thank you for the offer. We have a UK innovation grant of 2M under offer right now. We'll pull this off with or without it but I'd be very happy to list you one our contractors list. Drop me your email address and business details. You'll get a full appraisal of what we're aiming for well before you sign up for anything. It would look good for the claim if I could put you down for 100k sterling in consultancy fees. Obviously we need to base most of it in the UK but international collaboration ticks boxes too. I'll fill you in via more secure channels. Thanks man.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
Yes, I can vouch for Harris! He is probably after me the most experienced ABM user we got on this forum and has done some impressive work with it that I have seen. And, although we never met in person, a pleasant and professional person to work with. It would do me great pleasure to see some guys here collaborate on a major project using B4X & ABM. Good luck guys!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…