Range selection on different months

10 posts, 0 answers
  1. EY
    EY avatar
    7 posts
    Member since:
    Nov 2014

    Posted 27 Feb 2015 Link to this post

    Is it possible to select date ranges from different months?

    When I set selectionMode to TKCalendarSelectionModeRange, it only work within the current month.
    There is no way to scroll to previous or next months to expand selected date range.
    For example, it only shows February, and allows me to select ranges in February only. 
    What if I want to select a date range like January 12 - February 7 ?
  2. EY
    EY avatar
    7 posts
    Member since:
    Nov 2014

    Posted 27 Feb 2015 Link to this post

    Tried changing viewMode, minDate and maxDate -together and one by one- before and after setting selectionMode. None works.
  3. DevCraft banner
  4. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 27 Feb 2015 Link to this post

    Hello EY,

    This is a limitation of in the current implementation of TKCalendar. We plan to address the issue in our upcoming release that will be available by the end of March. I hope that this time frame is OK for you.

    Should you have other questions, do not hesitate to ask.

    Regards,
    Jack
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Damian
    Damian avatar
    2 posts
    Member since:
    May 2015

    Posted 11 May 2015 in reply to Jack Link to this post

    Is there any new related to this feature?

    I'm downloaded this version Telerik_UI_for_iOS_2015_1_0423_trial.pkg and looks like selections ranges from different months is not working.

     

    Thanks

    Damian

  6. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 May 2015 Link to this post

    Hi Damian,

    Yes, I confirm this feature is implemented. However, in this scenario the swipe gesture to change the month is not working because the selection gesture has greater priority. One option is to add two buttons to change the month manually. Consider the following code:
    TKCalendarMonthPresenter *presenter = (TKCalendarMonthPresenter*)self.calendarView.presenter;
     
    UIButton *buttonLeft = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 33)];
    [buttonLeft addTarget:self action:@selector(movePrev) forControlEvents:UIControlEventTouchUpInside];
    [buttonLeft setTitle:@"Prev" forState:UIControlStateNormal];
    [buttonLeft setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [presenter.headerView addSubview:buttonLeft];
     
    UIButton *buttonRight = [[UIButton alloc] initWithFrame:CGRectMake(self.calendarView.frame.size.width-50, 0, 50, 33)];
    [buttonRight addTarget:self action:@selector(moveNext) forControlEvents:UIControlEventTouchUpInside];
    [buttonRight setTitle:@"Next" forState:UIControlStateNormal];
    [buttonRight setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [presenter.headerView addSubview:buttonRight];

    You should call this code after adding TKCalendar to a super view.

    Here is the code  to change the current month:
    - (void)movePrev
    {
        [self.calendarView navigateBack:YES];
    }
     
    - (void)moveNext
    {
        [self.calendarView navigateForward:YES];
    }

    The selection behavior is the following: You can still select two dates with a swipe gesture, this will work only within the current month range. If you want to select multiple months, touch on a single date, then change the current month and touch again. This will select the range between the two months.

    I hope this helps. Should you have any questions, do not hesitate to write back.

    Regards,
    Jack
    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
  7. Damian
    Damian avatar
    2 posts
    Member since:
    May 2015

    Posted 03 Jul 2015 in reply to Jack Link to this post

    Thanks! It is working perfect.
  8. Rick
    Rick avatar
    2 posts
    Member since:
    Dec 2015

    Posted 24 Dec 2015 Link to this post

    Is this date range with different months also possible in the flow layout? If yes, does this count for both iOS & Android components?

    Since the docs still say its impossible:

    >> TKCalendarSelectionModeRange - A range between two dates on the same page can be selected.

  9. Sophi
    Admin
    Sophi avatar
    99 posts

    Posted 28 Dec 2015 Link to this post

    Hi Rick,

    The current implementation of the iOS TKCalendar allows only single cell selection in flow layout mode.

    Most probably it is the same with the Android calendar but I cannot guarantee that. It is best to write a separate ticket about the Android calendar in order to get a proper answer from the Android team.

    Regards,
    Sophi
    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. Rick
    Rick avatar
    2 posts
    Member since:
    Dec 2015

    Posted 29 Dec 2015 in reply to Sophi Link to this post

    Ok thanks Sophi, dealbreaker at the moment for me.. hope it will support flow layout in an upcoming version.

  11. Sophi
    Admin
    Sophi avatar
    99 posts

    Posted 01 Jan Link to this post

    Hello Rick,

    Thank you for sharing your considerations regarding the TKCalendar and the range selection in flow layout.
    We understand that this is important to your project so we are going to consider including this feature in one of our upcoming releases.
    I have created an issue in our feedback portal, here is link to it so you can be up to date with it's status and progress.

    In case some other questions or considerations come up, feel free to contact us any time.

    Regards,
    Sophi
    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
DevCraft banner