Android Question How to set a date on datepicker

Massy

Member
Licensed User
Longtime User
Hello, I'm using anotherdatepicker and I need to open it with a particular date... let's say I have a string like this: "9/9/2014" and I need to show the ADP with that date inserted... then the user click on the date and can modify it....
I tryed to pass the value... also with 00:00:00 but I always get an error saying it's and invalid double...
how could I do it?
Thanks for any help
Peace
Massy
 

DonManfred

Expert
Licensed User
Longtime User
You are giving a string as parameter. But you must give a valid date-value which must be double...

B4X:
    DateTime.DateFormat = "MM/dd/yyyy"
    DateTime.TimeFormat = "HH:mm:ss"
    EditText1.Text = DateTime.Date(DateUtils.SetDate(1968, 12, 19))
    EditText1.Tag = DateUtils.SetDate(1968, 12, 19)
    ADP.SetDate(EditText1.Tag, True)
    ADP.Show
 
Upvote 0
Top