Rad Calendar Swipe issue

12 posts, 0 answers
  1. snr
    snr avatar
    2 posts
    Member since:
    Dec 2017

    Posted 14 Dec 2017 Link to this post

    Currently for Calendar swipe is happening left or right , i want to add up and down swipe instead of left and right?

    How can  i achieve this?

     

    Thanks in advance,

    Siva

  2. snr
    snr avatar
    2 posts
    Member since:
    Dec 2017

    Posted 14 Dec 2017 Link to this post

    i want add some info to my earlier post,

    For IOS i want to add up and down swipe, currently it is using left and right swipe.

    Thanks,

    Siva

     

     

  3. Nikolay
    Admin
    Nikolay avatar
    37 posts

    Posted 19 Dec 2017 Link to this post

    Hello,

    The iOS calendar supports several transitions to switch between months. To change the orientation of the default transition you need to set the TransitionIsVertical property of the TKCalendarMonthPresenter to true. Here is a simple code snipped of how you can achieve this:

    var calendarPresenter = calendarView.Presenter as TKCalendarMonthPresenter;
    if (calendarPresenter != null)
    {
        calendarPresenter.TransitionIsVertical = true;
    }

    You can find more information about the calendar transitions in our documentation - link

    I hope I've been helpful.
     
    Regards,
    Nikolay
    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
  4. akhil
    akhil avatar
    4 posts
    Member since:
    Jan 2018

    Posted 12 Apr 2018 in reply to Nikolay Link to this post

    Hi,

    I am using RadCalendar in Xamarin forms, I want the calendar transition as vertical for the month view. Is it possible to get vertical scroll transition in Xamarin forms using RadCalendar?

    The control reference is here: https://docs.telerik.com/devtools/xamarin/controls/calendar/calendar-overview

    Please suggest.

     

     

  5. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1147 posts

    Posted 12 Apr 2018 Link to this post

    Hello Akhil,

    Nikolay's code snippet shows how to change the scrolling direction of the calendar. Since you're using Xamarin.Forms and the TransitionIsVertical property is on the native iOS TKCalendar control, you'll need to set it using a Xamarin Custom Renderer or Xamarin Effect.

    Custom Renderer

    You can see an example in the RadCalendar's iOS Custom Renderer article.

    Note that because Customer Renderers are a general Xamarin.Forms topic and not directly related to the UI for Xamarin feature, we do not have documentation for it. However, you can find a in-depth tutorials and walk-throughs in the Xamarin Custom Renderer documentation.

    Effect

    You could also use a Xamarin Effect to access the native control's properties, see the Creating an Effect Xamarin.Forms documentation for more information and how to get started.

    Once you've set up your Effect classes, you could use the OnAttached method of the Effect to set the value:

    [assembly: ResolutionGroupName("MyCompanyName")]
    [assembly: ExportEffect(typeof(ScrollDirectionEffect), "ScrollDirectionEffect")]
    namespace CalendarWithXamarinEffect.iOS.Effects
    {
        public class ScrollDirectionEffect : PlatformEffect
        {
            protected override void OnAttached()
            {
                try
                {
                    var tkCalendar = Control as TKCalendar;
     
                    if (tkCalendar?.Presenter is TKCalendarMonthPresenter calendarPresenter)
                    {
                        calendarPresenter.TransitionIsVertical = true;
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
                }
            }
     
            protected override void OnDetached()
            {
                // not used
            }
        }
    }


    and eventually in the Xamarin.Forms app, you can use the effect:

    <telerikInput:RadCalendar x:Name="calendar">
        <telerikInput:RadCalendar.Effects>
            <effects:ScrollDirectionEffect />
        </telerikInput:RadCalendar.Effects>
    </telerikInput:RadCalendar>


    Regards,
    Lance | Tech Support Engineer, Sr.
    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
  6. akhil
    akhil avatar
    4 posts
    Member since:
    Jan 2018

    Posted 17 Apr 2018 in reply to Lance | Manager Technical Support Link to this post

    Thanks Lance for the solution. Its working as expected now.

    I just want to ask one more question, please suggest.

    In xamarin forms RadCalendar, I want to customize the selected cell, I mean by default the selected date displays as a highlighted with a blue colored circle but instead of circle, I want it to be get highlighted with some another color and shape. For example: The selected date should be display as a rectange instead of circle and its color should be green instead of blue. I want this customization for IOS platform only.

     

     

     

     

     

     

  7. akhil
    akhil avatar
    4 posts
    Member since:
    Jan 2018

    Posted 17 Apr 2018 in reply to akhil Link to this post

    Also Lance, Is it possible to display days as single character. For example Sunday as "S" instead of "Sun"? Please suggest
  8. akhil
    akhil avatar
    4 posts
    Member since:
    Jan 2018

    Posted 17 Apr 2018 in reply to akhil Link to this post

    Attached Image is for the reference.

    Looking for the similar output.

  9. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1147 posts

    Posted 17 Apr 2018 Link to this post

    Hi akhil,

    Take a look at the iOS Custom Renderer article for how to access the native calendar to apply custom styling. Additionally, the native iOS Calendar customization article to see how to access certain parts of the control. Lastly, you can look at examples of the RadCalendar and TKCalendarView in the Developer Focused Examples.

    As far as implementing your specific requests, you can reach out to our Custom App / Custom Development partners to get assistance with your custom styling requirements.

    Regards,
    Lance | Tech Support Engineer, Sr.
    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
  10. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1147 posts

    Posted 17 Apr 2018 Link to this post

    Hello Akhil,

    I wanted to follow up with you to show you where to look in the SDKBrowser demo to find the custom renderer that configures the cell styles. Here's a screenshot to guide you:



    Regards,
    Lance | Tech Support Engineer, Sr.
    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
  11. John
    John avatar
    8 posts
    Member since:
    May 2019

    Posted 05 Jul 2019 Link to this post

    Sorry to hijack this thread, but I need the same for Android.  I need the calendar to scroll left to right, not up and down.  Can you help with an Effect, or at least the properties in the native control that I would need to set?

    Thank you.

  12. John
    John avatar
    8 posts
    Member since:
    May 2019

    Posted 07 Jul 2019 in reply to John Link to this post

    I have found the documentation on the Android Custom Renderers and Android Native control information and have what I need.  

    Thank you.

Back to Top