Hello Erel,
I've done it with B4XDialog, and worked well. I've attached the code with the two different styles (calendar and picker date dialog).
Some questions:
- In calendar style (B4XDateTemplate), using exactly the same code of that link (
https://www.b4x.com/android/forum/threads/b4x-light-theme-b4xdatetemplate.111837/#content), the arrows of month and year are white color, and not black/gray. If I want these buttons (btnMonthLeft, btnMonthRight, btnYearLeft and btnYearRight) with white background color, I can't see the arrows. I've tried to change some ways of their TextColor property, without success. How to change it? (you will see in the file attached).
- Yet in the calendar style, the names of the months and week days will show in the language I set with the folder pt.lproj (in my case)? Because the picker style is showing the correct language (portuguese here), but the calendar style is in English.
- Even the picker style probably will work with you - here is working too - sometimes I get an error in line 74 when I call the picker style dialog. The error is similar that when I was trying to use the old CustomLayoutDialog. I swear the code was the same as this file. It was working fine, and then the error below was showed. And then after a few tries, including opening and closing b4i, reestablishing the bridge, reinstall the app, etc, it returned to normal. My project, in which I am implementing this code, the same happens, sometimes works and sometimes this error appears:
Line 74:
B4X:
pdatepicker.LoadLayout("datepicker")
Error:
B4X:
Application_Start
Application_Active
Error occurred on line: 74 (Main)
Object was not initialized (UIView)
Stack Trace: (
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1227356
libobjc.A.dylib objc_exception_throw + 56
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 135616
ETD Cadastro -[B4IObjectWrapper object] + 136
ETD Cadastro -[B4IViewWrapper setWidth:] + 52
ETD Cadastro -[LS_datepicker LS_general:::] + 252
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1252384
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 7472
ETD Cadastro +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
ETD Cadastro +[B4ILayoutBuilder runScripts:::] + 980
ETD Cadastro -[B4ILayoutBuilder loadLayout:::] + 2312
ETD Cadastro -[B4IPanelWrapper LoadLayout::] + 204
ETD Cadastro -[B4XViewWrapper LoadLayout::] + 100
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 1252384
CoreFoundation 1B9B1E61-8CB4-3903-9870-402C3DE959BB + 7472
ETD Cadastro +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 1608
ETD Cadastro -[B4IShell runMethod:] + 448
ETD Cadastro -[B4IShell raiseEventImpl:method:args::] + 2172
ETD Cadastro -[B4IShellBI raiseEvent:event:params:] + 1580
ETD Cadastro __33-[B4I raiseUIEvent:event:params:]_block_invoke + 60
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 374288
libdispatch.dylib A3849F96-1C9F-36C5-A15F-70C566F14CFF + 377220
Attached file in my Google Drive (as I received the message it is too large, in the forum):
link
EDIT: I've just noticed in the project where I am implementing the code maybe a important thing. In Debug mode, I have the error above when I call the picker style date dialog. But without any modification, I build the app in Release mode and there everything works well.
Thanks again!