B4A Library [Class] AnotherDatePicker - A simple "web style" date picker

Status
Not open for further replies.

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
If I execute in debug mode, the control works, the problem appears when I work in release mode. The strange thing is that I the strange thing is that I have the same instructions in other forms and works well
 

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Thanks Erel!!. I attach my code. I add the red line in activity_create. The anothedatepicker name is "ADP", it's the format OK???

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:

Activity.LoadLayout("DatosGenerales")
Activity.Title=Main.strEstG



DateTime.DateFormat="dd/MM/yyyy"

CallSubDelayed(ADP,"AddToActivity")
ADP.SetDate(DateTime.now, True)


If FirstTime Then
GPS_Tablet.Initialize("GPS_Tablet")
End If

blnGuardar=True

FillDatosGenerales
'
End Sub
 

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Hi again

I check the line and logically does not work. I check that "AddToActivity" is a sub included in "anotherdatepicker" control. I dont´know as I can call to datepicker with callsubdelayed.

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
I think you misinterpreted erels answer.

Add the Datepicker in Activity_create and call a sub with callsubdelayed which then will set the date you want to have in the datepicker...
In the delayed sub you place the
B4X:
ADP.SetDate(DateTime.now, True)

But maybe it´s just me which misinterpreted the answer!?
 

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
J je je.... yes yes I put in all my forms (activity_create) that use anotherdatepicker, the rutine "ADP.SetDate(DateTime.now, True)" (you can observe my code line in the last mail) but in any occasions the control stop to work and I have an error, "the panel should be inicialized", and the programm is stopped. We don´t understand where the mistake is.

Thanks Manfred
 

Pilar-JLSineriz

Active Member
Licensed User
Longtime User
Thanks Erel, i'll try now.. I've finished the APK and I don´t know if it´'s a good idea to modify the control now
 

Humberto

Active Member
Licensed User
Longtime User
I´m trying the sample in post #1 and I´m geting the error in attach
Some one can help ?

My b4a version is 5.50

Thnaks
 

Attachments

  • error.png
    70.6 KB · Views: 191
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…