Share My Creation A Windows like DatePicker (DateDialog)

In stead of the usual DateDialog I was in need of a DateDialog like the Windows DatePicker, and programmed this DatePicker activity module. I think it gives the user at better overview of the days of the month to select from.

The DatPicker should be added as a new Activity module and called with StartActivity.
When the user selects a day, it can be read from the calling Activity. (Under Activity.Resume).

Please see corwin42's code below. He has made some great improvements to the module.

/Erik Bertelsen
 

Attachments

  • DatePicker.zip
    342.8 KB · Views: 4,816
Last edited:

TyneBridges

Member
Licensed User
Longtime User
The file should be located in your project Files folder.

Sorry, I still don't understand - do you mean just the missing layout, or all of the files? I thought the Date Picker was a library, which is why I put everything in there, following the file structure of the download.

:sign0013:
 

TyneBridges

Member
Licensed User
Longtime User
Still stuck on file locations

Can anyone else help? On Erel's suggestion, I have moved the DatePicker folder into my project folder, leaving the structure inside it as it was. When I compile I notice that the system copies KalenderActivity.bas to the top level of my folder (that is, outside the DatePicker folder) and the compilation seems to succeed, but I still get the runtime error described above.

Where do I need to put kalender.bal? I could try putting it next to KalenderActivity.bas but I would like to understand what I'm doing rather than just use trial and error, so I'm hoping someone can clarify.

Thanks.
 

TyneBridges

Member
Licensed User
Longtime User
The file should be located in your project Files folder.

Can anyone else help? On Erel's suggestion, I have moved the DatePicker folder into my project folder, leaving the structure inside it as it was. When I compile I notice that the system copies KalenderActivity.bas to the top level of my folder (that is, outside the DatePicker folder) and the compilation seems to succeed, but I still get the runtime error described above.

Where do I need to put kalender.bal? I could try putting it next to KalenderActivity.bas but I would like to understand what I'm doing rather than just use trial and error, so I'm hoping someone can clarify.

Thanks.

I've also tried moving the file as described above and still get the same error.

I'm puzzled by this in two respects. Firstly, I don't understand why there's a "File not found" error when the file is there and the name matches. Secondly, if Basic4Android is creating a single executable file, shouldn't the process fail at the compilation stage if a resource is missing, rather than at runtime?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Secondly, if Basic4Android is creating a single executable file, shouldn't the process fail at the compilation stage if a resource is missing, rather than at runtime?

Layout files are dynamically loaded at runtime. They are not checked by the compiler.

Can you upload your project (File - Export as zip)?
 

TyneBridges

Member
Licensed User
Longtime User
Layout files are dynamically loaded at runtime. They are not checked by the compiler.

Can you upload your project (File - Export as zip)?

Thanks. I think I've discovered the problem - I hadn't included the resource in the list at the top right of the screen. My project now runs, as far as it goes.

I now just need to work out the intricacies of date handling! :)
 
Last edited:

CoreTech4k

New Member
Licensed User
Hi, i know this thread is old, but I think the content is very useful thanks a lot.
BTW I've tried the datepicker on HOLO theme it seems it does not support it. There's an error on date.
 
Top