private static bool ToDateOnly(string value, out T result) { var formatString = GetDateTimeFormatString(value); var success = BindConverter.TryConvertToDateOnly(value, CultureInfo.InvariantCulture, formatString, out DateOnly parsedValue); if (success) { result = (T)(object)parsedValue; return(true); } result = default; return(false); }