Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Dialog As B4XDialog
Private DateTemplate As B4XDateTemplate
Private xui As XUI
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dialog.Initialize(MainForm.RootPane)
DateTemplate.Initialize
Dialog.Title = "Example"
End Sub
Sub MainForm_MouseClicked (EventData As MouseEvent)
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