This is a migrated thread and some comments may be shown as answers.

Bug in calendar SelectedDate on IOS

4 Answers 181 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Andriy
Top achievements
Rank 1
Andriy asked on 12 Jul 2017, 06:28 AM

I created simple Xamarin.Forms app with calendar:

    <StackLayout VerticalOptions="Center">
        <telerikInput:RadCalendar SelectedDate="{Binding SelectedDate, Mode=TwoWay}" />
        <Label FontSize="35" Text="{Binding SelectedDate}" />
    </StackLayout>

so, from 10/29/2017 I got incorrect selected date, for example when I click on 30 October  SelectedDate equals 29 Octovber, on 1 November  SelectedDate = 31  Octovber.....

 

Here is code of page and ViewModel

public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
            BindingContext = new MainPageViewModel();
        }
    }

    public class MainPageViewModel : INotifyPropertyChanged
    {
        private DateTime _selectedDate;

        public DateTime SelectedDate
        {
            get { return _selectedDate; }
            set
            {
                _selectedDate = value;
                OnPropertyChanged();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        public MainPageViewModel()
        {
            SelectedDate = DateTime.Now;
        }
    }

 

p.s. Problem is only in iOS

4 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 14 Jul 2017, 01:18 PM
Hello Andriy,

We have tried to reproduce the issue, but to no avail. Attached you can find my test project and video showing how it behaves at my end. It would be great if you can check it out and let me know if I am not missing something.

So as it seems like this depends on specific device setup it would be helpful if you could share on what device\simulator you are reproducing the issue and also what are the Date and Time settings on it.

Also can you share what version of the controls you are using.

Looking forward to your reply.

Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Andriy
Top achievements
Rank 1
answered on 15 Jul 2017, 06:00 AM
proof
0
Andriy
Top achievements
Rank 1
answered on 15 Jul 2017, 06:15 AM

Here is screens from your app example. But I don't have subscription, so I used dll's from trail:

iOS nuget's:

<packages>
  <package id="SkiaSharp" version="1.55.1" targetFramework="xamarinios10" />
  <package id="SkiaSharp.Views" version="1.55.1" targetFramework="xamarinios10" />
  <package id="SkiaSharp.Views.Forms" version="1.55.1" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.Chart.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.Common.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.DataControls.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.DataVisualization.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.Input.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.Primitives.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Telerik.UI.for.Xamarin.SkiaSharp.Trial" version="2017.2.626.3" targetFramework="xamarinios10" />
  <package id="Xamarin.Forms" version="2.3.4.247" targetFramework="xamarinios10" />
</packages>

 

PCL nuget's:

 

<packages>
  <package id="SkiaSharp" version="1.55.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="SkiaSharp.Views.Forms" version="1.55.1" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.Chart.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.Common.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.DataControls.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.DataVisualization.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.Input.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.Primitives.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.SkiaSharp.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Telerik.UI.for.Xamarin.Trial" version="2017.2.626.3" targetFramework="portable45-net45+win8+wp8+wpa81" />
  <package id="Xamarin.Forms" version="2.3.4.247" targetFramework="portable-net45+win+wp80+MonoAndroid10+xamarinios10+MonoTouch10" />
</packages>

0
Georgi
Telerik team
answered on 18 Jul 2017, 01:36 PM
Hello Andriy,

Thank you for the images and the additional information.

This is a strange situation as the sample project (using the same assemblies) behaves differently. So I have tested it on different mac machines and tried different combinations of Region and TimeZone, but I was still not able to reproduce the issue. Also I have played with the first day of the week settings (set to Monday as in Ukraine), but still no luck.

So it would be great if you can let us know the Date,Time, Language and TimeZone settings of the device you are using as well as if you have tested it on another device.

Looking forward to hearing from you soon.


Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar & Scheduling
Asked by
Andriy
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Andriy
Top achievements
Rank 1
Share this question
or