How to set / show button "Today" with B4XDateTemplete XUI ?
a bit code...
B4X:
Sub SelectDate
Wait For (Dialog.ShowTemplate(DateTemplate, "", "", "Cancel")) Complete (Result As Int)
If Result = xui.DialogResponse_Positive Then
Log($"Selected date: $Date{DateTemplate.Date}"$)
End If
End Sub
Dim rs As ResumableSub = Dialog.ShowTemplate(datepicker, "", "Today", "Cancel")
Wait For (rs) Complete (Result As Int)
If Result <> xui.DialogResponse_Cancel Then
If Result = xui.DialogResponse_Negative Then datepicker.Date = DateTime.Now
Log($"User choose: $Date{datepicker.Date}"$)
End If