summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkleem <cdark.lim@samsung.com>2017-07-17 07:24:17 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:39 (GMT)
commita84194f4ea7f0754578d262b23c95f8c4fd35b04 (patch)
tree51c288137f52a61956b5338266fa302c23550f8d
parent8a6ea57a7b6610d1d9c6abeec622e6f0df723d31 (diff)
downloadxamarin-forms-a84194f4ea7f0754578d262b23c95f8c4fd35b04.zip
xamarin-forms-a84194f4ea7f0754578d262b23c95f8c4fd35b04.tar.gz
xamarin-forms-a84194f4ea7f0754578d262b23c95f8c4fd35b04.tar.bz2
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 39a2529..73f8eab 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 211ccf3..bdad8a9 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)