Maui .NET 10 migration.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Sarand.Net.Mobile.Maui.Layouts;
|
||||
using Sarand.Net.Mobile.Maui.Layouts;
|
||||
using Sarand.Net.Mobile.Maui.Views;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
@@ -83,12 +83,12 @@ namespace Sarand.Net.Mobile.Maui.Controls
|
||||
}
|
||||
public DateTime MinimumDate
|
||||
{
|
||||
get { return pickerDate.MinimumDate; }
|
||||
get { return pickerDate.MinimumDate ?? DateTime.MinValue; }
|
||||
set { pickerDate.MinimumDate = value; }
|
||||
}
|
||||
public DateTime MaximumDate
|
||||
{
|
||||
get { return pickerDate.MaximumDate; }
|
||||
get { return pickerDate.MaximumDate ?? DateTime.MaxValue; }
|
||||
set { pickerDate.MaximumDate = value; }
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
@@ -98,7 +98,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
|
||||
get
|
||||
{
|
||||
if (invalidDate) return DateTime.MinValue;
|
||||
return pickerDate.Date;
|
||||
return pickerDate.Date ?? DateTime.MinValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Sarand.Net.Mobile.Maui.Layouts;
|
||||
using Sarand.Net.Mobile.Maui.Layouts;
|
||||
using Sarand.Net.Mobile.Maui.Views;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
@@ -72,7 +72,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
|
||||
// Control value.
|
||||
public DateTime DateTime
|
||||
{
|
||||
get { return pickerDate.Date.Date + pickerTime.Time; }
|
||||
get { return pickerDate.Date.Date + (pickerTime.Time ?? TimeSpan.Zero); }
|
||||
set
|
||||
{
|
||||
if (DateTime.CompareTo(value) == 0) return;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -27,7 +27,7 @@ namespace Sarand.Net.Mobile.Maui.Controls
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public String FormattedTime { get { return DateUtil.Format(DateTime.Today + Time, Format); } }
|
||||
public String FormattedTime { get { return DateUtil.Format(DateTime.Today + (Time ?? TimeSpan.Zero), Format); } }
|
||||
// Styling.
|
||||
public double DefaultFontSize { get; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user