using System; using System.Globalization; using InABox.Core; using Xamarin.Forms; namespace comal.timesheets { public class DateTimeToBooleanConverter : BindableObject, IValueConverter { public bool EmptyResult { get; set; } public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value is DateTime date) return date.IsEmpty() == EmptyResult; return false; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }