Private minyear As String = "2019"
'Date cannot be before jan 1, 2019
Sub Pref_IsValid (TempData As Map) As Boolean
Dim x As Long =DateTime.dateparse("1/1/" & minyear)
Dim d As Long = TempData.GetDefault("Date", DateTime.Now)
If d < x Then
prefdialog.ScrollToItemWithError("Date")
Return False
End If
Return True
End Sub