Hello.
Help me fix the calendar error (AnotherDatePicker).
When the test is performed for the first time,
the dates are set perfectly,
but if you enter the test a second time,
the calendar page begins to live its own life.
If you use panels on the second page,
then the calendar is not visible at all
(standard example AnotherDatePicker, but on the second page)
Do you think this is normal?
Click Exit and the calendar will be displayed on the main page, where it is absolutely not needed...
And if you put the controls AnotherDatePicker on the panel on the second page, then when you run the Test again, you will not see the calendar at all.
This is an element AnotherDatePicker error - it only works correctly on the main page
Yes I see what you mean: this is causing you not to test when returning to the main page or the date picker is displayed. You must hide both the EXIT button while displaying the date picker.
the exit button is a special case for example,
in fact, there may be about 10-30 controls on the page,
do you suggest making them all invisible so that they do not hang in front of the calendar?
Then why does everything work as it should for the first time without any dancing with a tambourine?
I wanted to try to hide the Exit button, but the control AnotherDatePicker has only one event - Closed and it is not clear how to hide this Exit button when selecting a date, and when opening the page, you can not immediately hide the Exit button, because you may not need to change the date
After enjoying a wonderful Christmas dinner, I have made the following adjustments to your program, which means that controls on a panel are made invisible during the display of the datepicker.
Added a panel1 to Page2.bal
Placed the panel1 behind the controls (Button1) o
The controls (Button1) parent ofActivity in Panel1 changes
Page2.ball saved
Added Panel1 as 'Public Panel1 As Panel' on B4XPage2
I then 'quick and dirty' turned the display of Panel1 in B4XPage2 hardcoded off and on. Not a universal solution (you need to have a routine that would pass the page "B4XPage2" and the panel "Panel1" to AnotherDatePicker) for those cases where you need multiple occurrences of date picker on different B4XPages.
Edit: P.S. I've commented out all my adjustments marked '---
Hello. Thank you for your hard work. Unfortunately, I can't test this on the working layout due to its translation to Dialog + DateTemplate.
This path turned out to be both simpler and more reliable. Here is the link, user (Maxapec)