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

Discussion in 'Android Questions' started by FERNANDO SILVEIRA, May 21, 2018.

  1. FERNANDO SILVEIRA

    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
     
  2. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    This
     

    Attached Files:

  3. stevel05

    stevel05 Expert 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.
     
    FERNANDO SILVEIRA likes this.
  4. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

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

    Also, there is the following line at the top:

    Code:
    'xAnotherDatePicker v1.00
    So, does anybody know where is the version 1.03 code?
    @Erel

    Regards,
    Fernando
     
  5. FERNANDO SILVEIRA

    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.

    Code:
    #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;)
     
  6. stevel05

    stevel05 Expert 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.
     
    FERNANDO SILVEIRA likes this.
  7. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    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?
     
  8. stevel05

    stevel05 Expert Licensed User

    upload_2018-5-21_22-59-29.png

    Yes it's here:
     
    FERNANDO SILVEIRA likes this.
  9. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Waw!!! I was looking on the wrong place.
    Thanx a lot, Steve.
     
  10. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    One last thing, do you know where I adjust date format from mm/dd/yyyy to dd/mm/yyyy?
     
  11. stevel05

    stevel05 Expert Licensed User

    Add this line to the AnotherDatePicker Initialize Sub:
    Code:
    DateTime.DateFormat = "dd/MM/yyyy"
    You will also need to change the line in AppStart to:
    Code:
    AnotherDatePicker1.Date = DateTime.DateParse("23/02/2007")
    As the format change is for the whole App.
     
    FERNANDO SILVEIRA likes this.
  12. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Ok, that's it.

    Thank you.
     
  13. stevel05

    stevel05 Expert Licensed 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.
     
  14. FERNANDO SILVEIRA

    FERNANDO SILVEIRA Active Member Licensed User

    Yeah, that's what I did.
     
    stevel05 likes this.
  15. Erel

    Erel Administrator Staff Member Licensed 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).

    You can see the version in a comment on the first line of the class.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice