Private Sub DatePicker1_ValueChanged
'If not using B4XPages then change to Page1
Dim pvc As NativeObject = B4XPages.GetNativeParent(Me).As(NativeObject).GetField("presentedViewController")
If pvc.IsInitialized Then
pvc.RunMethod("dismissViewControllerAnimated:completion:", Array(True, Null))
End If
Log(DateTime.Date(DatePicker1.Ticks))
End Sub