summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkleem <cdark.lim@samsung.com>2017-07-17 16:24:17 +0900
committerdarkleem <cdark.lim@samsung.com>2017-07-17 16:24:17 +0900
commit90ebfce779401e04130de9d9eeaa2f462ba8617b (patch)
tree22115a88eaa6d69d49aa2d291f375310b9ef00e5
parent424893996d8021e831478cd644e707aa00536a77 (diff)
downloadxamarin-forms-90ebfce779401e04130de9d9eeaa2f462ba8617b.tar.gz
xamarin-forms-90ebfce779401e04130de9d9eeaa2f462ba8617b.tar.bz2
xamarin-forms-90ebfce779401e04130de9d9eeaa2f462ba8617b.zip
Fixed an issue where event occurs when Date&TimePicker is disabled
- This is a patch that should be removed when the efl issue is resolved Change-Id: I76dc59476594ef774212cfcf5948d02f7fa959e1 Signed-off-by: darkleem <cdark.lim@samsung.com>
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs19
-rw-r--r--Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs19
2 files changed, 24 insertions, 14 deletions
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs
index 39a25295..73f8eab3 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/DatePickerRenderer.cs
@@ -51,15 +51,20 @@ namespace Xamarin.Forms.Platform.Tizen
void OnEntryClicked(object sender, EventArgs e)
{
- Native.DateTimePickerDialog dialog = new Native.DateTimePickerDialog(Forms.Context.MainWindow)
+ // For EFL Entry, the event will occur even if it is currently disabled.
+ // If the problem is resolved, no conditional statement is required.
+ if (Element.IsEnabled)
{
- Title = DialogTitle
- };
+ Native.DateTimePickerDialog dialog = new Native.DateTimePickerDialog(Forms.Context.MainWindow)
+ {
+ Title = DialogTitle
+ };
- dialog.InitializeDatePicker(Element.Date, Element.MinimumDate, Element.MaximumDate);
- dialog.DateTimeChanged += OnDateTimeChanged;
- dialog.Dismissed += OnDialogDismissed;
- dialog.Show();
+ dialog.InitializeDatePicker(Element.Date, Element.MinimumDate, Element.MaximumDate);
+ dialog.DateTimeChanged += OnDateTimeChanged;
+ dialog.Dismissed += OnDialogDismissed;
+ dialog.Show();
+ }
}
void OnDateTimeChanged(object sender, Native.DateChangedEventArgs dcea)
diff --git a/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs b/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs
index 211ccf38..bdad8a9f 100644
--- a/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs
+++ b/Xamarin.Forms.Platform.Tizen/Renderers/TimePickerRenderer.cs
@@ -56,15 +56,20 @@ namespace Xamarin.Forms.Platform.Tizen
void OnClicked(object o, EventArgs e)
{
- Native.DateTimePickerDialog dialog = new Native.DateTimePickerDialog(Forms.Context.MainWindow)
+ // For EFL Entry, the event will occur even if it is currently disabled.
+ // If the problem is resolved, no conditional statement is required.
+ if (Element.IsEnabled)
{
- Title = DialogTitle
- };
+ Native.DateTimePickerDialog dialog = new Native.DateTimePickerDialog(Forms.Context.MainWindow)
+ {
+ Title = DialogTitle
+ };
- dialog.InitializeTimePicker(_time, null);
- dialog.DateTimeChanged += OnDialogTimeChanged;
- dialog.Dismissed += OnDialogDismissed;
- dialog.Show();
+ dialog.InitializeTimePicker(_time, null);
+ dialog.DateTimeChanged += OnDialogTimeChanged;
+ dialog.Dismissed += OnDialogDismissed;
+ dialog.Show();
+ }
}
void OnDialogTimeChanged(object sender, Native.DateChangedEventArgs dcea)