B4A Class Extended B4XDateTemplate UPDATE 3.0

Name: TD_B4XDateTemplate
Version: 3.0
Code: B4X
Licence: free

qemu-system-x86_64_boyIarf8QA.png
qemu-system-x86_64_rAqrQfNeKt.png
qemu-system-x86_64_OAaTocS2eQ.png


This Template is based on the Template lmB4XDateTemplate from (C) lucasMS (Forum Page). I applied some more functions.
This Template may be used with B4XDialog.showTemplate. Find instrutions as comment in the example project.

Modifications/Enhancement:
  • Added a Time pane to select a time.
  • Added custom properties to get/set/show/hide Time or get/set/remove Date Markers.
  • Added KeyValue storage to store the Markers.
  • Added different color for work days and weekend days.
  • Added Ok Button at the lower right time pane corner to return only selected time without zhe need do select a date.
In the Dialog result you may return the selected values by use the properties getDate / getTime / getMarker.


For detailed example see attached Example Project (Download). Project includes Class in clear code for examin and own modification.

Notice!
Please you to test it. Reply any errors or comments. Thank you.
 

Attachments

  • TD_B4XDateTemplate.b4xlib
    4.7 KB · Views: 39
Last edited:

Guenter Becker

Active Member
Licensed User

Ralle80

Member
Hi Guenther,
I'm facing several problems getting your example to work:

1. When opening the project, B4A complains about a missing file prodinfo.db(x)
2. I had to comment out the #CustomBuildAction Robocopy-Script that want's to copy a "..\..\Shared Files" folder, which I don't have.

After that the app compiles and starts, but when I touch any day in the calendar, nothing happens...

Thanks for your help !
 

Guenter Becker

Active Member
Licensed User
Hi Guenther,
I'm facing several problems getting your example to work:

1. When opening the project, B4A complains about a missing file prodinfo.db(x)
2. I had to comment out the #CustomBuildAction Robocopy-Script that want's to copy a "..\..\Shared Files" folder, which I don't have.

After that the app compiles and starts, but when I touch any day in the calendar, nothing happens...

Thanks for your help !
Hi,
please don't hesitate and try to use the update. It's is a complete overhaul.
 

Ralle80

Member
Hi Guenther,

with the new example, when I tap on a day in the calendar, following error is thrown:

1743532681997.png



1743532800226.png


Don't know what's wrong here - selectedDate is of type Long and all related functions/variables are also Long - why does it complain about a string ?

Thanks for your efforts !
 

Attachments

  • 1743532615809.png
    1743532615809.png
    67.1 KB · Views: 13

Guenter Becker

Active Member
Licensed User
Thank you very much. The failure is not in the Template! I did some tests and found it in the example project. I corrected it ad did a new cloud upload.

If you like to make correction by yourself please correct this line in the button1_click as followes: Dim note As String = mDateTempl.getMarker(mDateTempl.Date).

Sorry my fault.
 
Top