Android Question AnotherDatePicker Value Doesn't Set in SetDate()

Discussion in 'Android Questions' started by Richard Goh, Apr 18, 2019.

  1. Richard Goh

    Richard Goh Active Member Licensed User


    I was trying to set the AnotherDatePicker value using below code in Activity_Create. When try to get the value using adpDate.GetDate (without doing any date select from the calendar). The value is empty. Seems like it wasn't set until I do a select date from the calendar. Is it a bug? Any advice is highly appreciated.

    Sub Activity_Create(FirstTime As Boolean)
        adps = 
    end sub
    Thank you.
  2. Rubsanpe

    Rubsanpe Member Licensed User

    Bug? What behavior were you expecting? Until you select a date the events of the control are not executed to obtain the selected date. Until then the result is empty, just as if you had clicked on the cancel button.

  3. Richard Goh

    Richard Goh Active Member Licensed User

    Hi Rubsanpe,

    Thanks for your reply.

    Fyi, the adp is for records selection purpose and the date value is from another caller activity. This adp selection activity will first set the date value from caller when it's called and then execute a db selection prior to any adp date selection action. Subsequently the adp can be select for another date and it's working very well on that after performing manual adp selection. By right the adp value should be set whenever the SetDate function is performed. It's shouldn't wait for any manual selection action to be performed only set the actual value.

  4. Erel

    Erel Administrator Staff Member Licensed User

    There are several versions of ADP now. The latest one where it is implemented as a dialog is included in XUI Views. This is the most recommended one.

    Try to add Sleep(0) before you set the date.
  5. Richard Goh

    Richard Goh Active Member Licensed User

  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