Richard Goh Active Member Licensed User Longtime User Apr 18, 2019 #1 Hi, 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. Code: Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("myLayout") adps = Array(adpDate) adpDate.SetDate(DateTime.DateParse(Main.SelectedDate),True) end sub Thank you.
Hi, 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. Code: Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("myLayout") adps = Array(adpDate) adpDate.SetDate(DateTime.DateParse(Main.SelectedDate),True) end sub Thank you.
Rubsanpe Active Member Licensed User Longtime User Apr 18, 2019 #2 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. Rubén Upvote 0
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. Rubén
Richard Goh Active Member Licensed User Longtime User Apr 18, 2019 #3 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. Thanks. Upvote 0
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. Thanks.
Erel B4X founder Staff member Licensed User Longtime User Apr 18, 2019 #4 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. Upvote 0
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.
Richard Goh Active Member Licensed User Longtime User Apr 19, 2019 #5 Hi Erel, Thanks for your reply. The problem resolved using the XUI ADP. Below link is a reference for other who happened to have same issue or question. https://www.b4x.com/android/forum/threads/b4x-xui-anotherdatepicker.85160/ Thank you very much. Upvote 0
Hi Erel, Thanks for your reply. The problem resolved using the XUI ADP. Below link is a reference for other who happened to have same issue or question. https://www.b4x.com/android/forum/threads/b4x-xui-anotherdatepicker.85160/ Thank you very much.