Bug in calendar SelectedDate on IOS

5 posts, 0 answers
  1. Andriy
    Andriy avatar
    4 posts
    Member since:
    May 2014

    Posted 12 Jul Link to this post

    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

  2. Georgi
    Admin
    Georgi avatar
    362 posts

    Posted 14 Jul Link to this post

    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
  3. Andriy
    Andriy avatar
    4 posts
    Member since:
    May 2014

    Posted 15 Jul Link to this post

    proof
  4. Andriy
    Andriy avatar
    4 posts
    Member since:
    May 2014

    Posted 15 Jul Link to this post

    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>

  5. Georgi
    Admin
    Georgi avatar
    362 posts

    Posted 18 Jul Link to this post

    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
Back to Top