Android Question [B4X] [XUI] AnotherDatePicker which code is the final one?

FERNANDO SILVEIRA

Active Member
Licensed User
Hello guys,

I'm testing the code listed here and I still can't get dates before 1970. I read thru the thread and it seems it was fixed already.

Which is the most recent code? The attached files don't indicate the version level.

upload_2018-5-21_15-36-35.png


Regards,

Fernando
 

stevel05

Expert
Licensed User
Longtime User
They should all be the latest version. A separate download for the demos for each OS and the .bas module file it you only want to download that and not the demo.
 
Upvote 0

FERNANDO SILVEIRA

Active Member
Licensed User
They should all be the latest version. A separate download for the demos for each OS and the .bas module file it you only want to download that and not the demo.

No, it is not. I downloaded it again and it is limited to 1970.

Also, there is the following line at the top:

B4X:
'xAnotherDatePicker v1.00

So, does anybody know where is the version 1.03 code?
@Erel

Regards,
Fernando
 
Upvote 0

FERNANDO SILVEIRA

Active Member
Licensed User

Ok, now I am using the 1.03 code, but it is still limited to 1970...
@Erel

Changed line below from 1970 to 1900 with no visible effect.

B4X:
#DesignerProperty: Key: MinYear, DisplayName: Minimum Year, FieldType: Int, DefaultValue: 1900, MinRange: 0, MaxRange: 3000


I'm 56 yo... may be this code doesn't apply to me... *lol* :p:D;):D:p;)
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
You need to change the Minimum Year field in the designer for the layout that contains the AnotherDatePicker Custom View. Layout 1 in the case of the B4j example.
 
Upvote 0

FERNANDO SILVEIRA

Active Member
Licensed User
You need to change the Minimum Year field in the designer for the layout that contains the AnotherDatePicker Custom View. Layout 1 in the case of the B4j example.

Thanx, Steve

I got this layout 1, but could not realize where is this 1970 information stored so I can change it. Doesn't seem to be a property of button btnYearLeft.

Do you know?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Add this line to the AnotherDatePicker Initialize Sub:
B4X:
DateTime.DateFormat = "dd/MM/yyyy"

You will also need to change the line in AppStart to:
B4X:
AnotherDatePicker1.Date = DateTime.DateParse("23/02/2007")

As the format change is for the whole App.
 
Upvote 0

FERNANDO SILVEIRA

Active Member
Licensed User
Add this line to the AnotherDatePicker Initialize Sub:
B4X:
DateTime.DateFormat = "dd/MM/yyyy"

You will also need to change the line in AppStart to:
B4X:
AnotherDatePicker1.Date = DateTime.DateParse("23/02/2007")

As the format change is for the whole App.

Ok, that's it.

Thank you.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
Thinking about it, it would probably be better to change the format in the Main.AppStart sub (before the AnotherDatePicker1.Date = DateTime.DateParse("23/02/2007") line), then there are not changes to the AnotherDatePicker Module.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm sorry but I don't understand this thread.
As you can see in the screenshot you posted:

Latest version is attached separately.


This means that the latest version is the attached module file (the file that ends with .bas).

The attached files don't indicate the version level.
You can see the version in a comment on the first line of the class.
 
Upvote 0
Top