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

Calendar Select Range Issue with clearing first selection

3 Answers 55 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.
Kyle
Top achievements
Rank 1
Kyle asked on 31 Mar 2016, 06:04 PM

Hi,

I'm trying to implement this calendar as a date picker on my app with range selection.  As part of this, i'm trying to only allow them to select a range of 10 days total.  

If this click inside of this 10 days, it will select the range.   -> This works ok

If they click outside of this 10 days, I want to change their "starting" date of the range to this new date, so that they now have a new 10 day window to interact with.  If they click within this window I want it to be a range.  However, what is happening is that i'm able to show that they only have the new day selected.  But it seems like in the background, the calendar still thinks I have a range selected, instead of just my 1 selection.  I haven't been able to find a way to "clear" out the calendar's thinking of the first day in its selection.  

 

If I only have the first day of a range selected, how can I either programmatically change the "first" day of a range when only 1 is selected.  Or how can I clear out the range so that the calendar doesn't think I have a range selected?  I've tried several times to change the calendar.SelectedDateRange.Start and End with no success.  It seems like somewhere in the background there is some property on the calendar that I can't see that is telling it whether or not it is selecting the first or second date in a range.

 

Let me know if you need more information.  I can't figure out what i'm missing.

 

3 Answers, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 04 Apr 2016, 09:18 AM
Hi, Kyle,

Please, find my responses in your other thread.

Regards,
Adrian
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
Alex
Top achievements
Rank 1
answered on 27 Apr 2016, 09:27 AM
Can you give a link on your answer?
0
Adrian
Telerik team
answered on 28 Apr 2016, 10:41 AM
Hi, Alex,

Internally TKCalendar keeps track of an anchor date which currently can't be reset. This issue is logged here. Feel free to vote and comment.

Regards,
Adrian
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
Kyle
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Alex
Top achievements
Rank 1
Share this question
or