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

Range selection on different months

8 Answers 166 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
EY
Top achievements
Rank 2
EY asked on 27 Feb 2015, 09:02 AM
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 ?

8 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 27 Feb 2015, 11:37 AM
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.

 
0
Damian
Top achievements
Rank 1
answered on 11 May 2015, 06:45 PM

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

0
Jack
Telerik team
answered on 13 May 2015, 05:52 PM
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
0
Damian
Top achievements
Rank 1
answered on 03 Jul 2015, 08:50 PM
Thanks! It is working perfect.
0
Rick
Top achievements
Rank 1
answered on 24 Dec 2015, 07:45 PM

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.

0
Sophi
Telerik team
answered on 28 Dec 2015, 09:04 PM
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
0
Rick
Top achievements
Rank 1
answered on 29 Dec 2015, 03:09 PM

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

0
Sophi
Telerik team
answered on 01 Jan 2016, 10:04 PM
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
Tags
Calendar
Asked by
EY
Top achievements
Rank 2
Answers by
Jack
Telerik team
Damian
Top achievements
Rank 1
Rick
Top achievements
Rank 1
Sophi
Telerik team
Share this question
or