Datepicker Dialog V1.0.0

DonManfred

Expert
Licensed User
Longtime User
The - not working - Timepicker of this library does look slightly different
 

asales

Expert
Licensed User
Longtime User
Hi @DonManfred.

I try the app of original library in Android 4.0.4 and the datepicker works fine:
https://play.google.com/store/apps/details?id=com.mirko.sample&hl=it

This wrapper don't works in SDK < 17?
I try to use the example in 2 devices (tablet 1024x600 and Xperia MiniPro 320x480) with Android 4.0.4 and I get this error:
B4X:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NullPointerException
    at android.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1117)
    at android.app.BackStackRecord.run(BackStackRecord.java:592)
    at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1382)
    at android.app.FragmentManagerImpl$1.run(FragmentManager.java:426)
    at android.os.Handler.handleCallback(Handler.java:605)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4429)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
    at dalvik.system.NativeStart.main(Native Method)
 

wimpie3

Well-Known Member
Licensed User
Longtime User
@Erel and others, could someone please take a look at this? DonManfred has done all the work to convert this library to B4A, but the timepicker is not working. For anyone trying to make a Material-design app, this is a "must have" that is currently missing in B4A... unfortunately my Java skills are close to 0 otherwise I'd have given it a try...
 

rleiman

Well-Known Member
Licensed User
Longtime User
I hope someone makes the time picker available to those who have KitKat because my development device can't be upgraded to Lollipop. I must use KitKat. The Google calendar uses the KitKat time picker which I hope someone in the B4A community will develop like described by wimpie3.
 

rleiman

Well-Known Member
Licensed User
Longtime User
This looks like a nice date picker that looks like the KitKat one but it crashes my app when I tap on the Done button. I can't figure out why it crashes like that. I used the same coding as in your sample app.

Here's the code I'm using.

B4X:
Sub edtDateStart_FocusChanged(HasFocus As Boolean)
  
    If HasFocus Then
        dtTheDatePicker.DatePicker("edtDateStart", 1968,12,19)
    End If
End Sub


ATTENTION:
This is a library to show a Datepicker or an Timeticker.
Sadly the Timepicker still DOES NOT WORK!
I dont´t know how to fix this problem! :mad:

As i now worked more than 80 hours on this library and the fact that the datepicker is working and looking really nice... I deciced to publish this library only as a DATEPICKER library.
I attach the javasource (Eclipse) too in the hope someone other here in b4a forum maybe get it to work and finish this library :rolleyes:

Anyone who is interested in trying the Timepicker to work too can download the Java-Source of this library here.

Here we go

This library is a wrapper for this Github project.

DateTimePicker
Version:
1.0.1
  • DateTimePicker
    Events:
    • ondateset (year As Int, month As Int, day As Int)
    • ontimeset (HourOfDay As Int, minute As Int)
    Methods:
    • DatePicker (tag As String, year As Int, month As Int, day As Int)
    • Initialize (EventName As String)
    • TimePicker (tag As String)


This library is Donationware. You can download the library, you can test the library. But if you want to USE the library in your App you need to Donate for it.
Please click here to donate (You can donate any amount you want to donate for the library (or my work) :)


datepickerdialog001.png
datepickerdialog0002.png
 

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Don,

If you mean the logs on the right side of the B4A GUI, it just says "LogCat connected to: B4A-Bridge: alps UMI ZERO" and no other messages when the app crashes.
 

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Don,

Thanks. It's working now.

Using your suggestion, I set the Compilation Mode dropdown to Debug. Since my phone was already set to USB debugging enabled, I connected to the logs in the logs tab of the GUI and it told me I needed to enable the vibration permission. I'm not sure why that one was required, but as soon as I enabled it with the app manifest editor, there was no app crashing.

Yesssss! I got a KitKat date picker now. :)

Will you be working on the time picker any time soon?
 
Last edited:

rleiman

Well-Known Member
Licensed User
Longtime User
I hope someone does make a library you can wrap the time picker into then all of us with KitKat can have the ultimate. ;)
 

DonManfred

Expert
Licensed User
Longtime User
Your libraries are the best.
Here are a lot of threads in the forum regarding this timepicker. EVERYWHERE you put your wish.

The only place should be in the wish-list forum! And it IS already there!

It does not help if you add this question to every thread you found!

Update to Android 5 and you can use the picker you are searching for with the DIALOGS library (i told you already!) TODAY.
 

Anser

Well-Known Member
Licensed User
Longtime User
Hi,
In this lib is there a way to disable all the dates before the current date or a particular date. For eg the app user should be able to choose only a date which is higher than current date, the rest of the dates in the calendar should appear as disabled. May be useful for appointment booking etc
 
Top