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

Feature or Bug?

3 Answers 129 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
TwoLaJit
Top achievements
Rank 2
TwoLaJit asked on 20 May 2009, 04:52 AM
On the calendar with multi-select disabled...

when i click on a date, the selected date is set to the date i selected but when i unselect, rather than go back to today's date, it is set to
1/1/1980.

I have changed this in code so that on click, if the date it 1/1/1980 it sets it to today's date.

on load i even change the focused and selected dates to today but i still see 1/1/1980 register when i unselect a date.

Can someone explain this behavior?

3 Answers, 1 is accepted

Sort by
0
Accepted
Boyko Markov
Telerik team
answered on 22 May 2009, 10:34 AM
Hi Brendan,

RadCalendar selection works on a Toggle principle. This means that if you click a cell the selection is toggled - selected or unselected. For example:

When a date is unselected then the SelectedDates collection of RadCalendar is empty and by default the new DateTime(1980, 1, 1);  value is returned. This is an expected behavior with the current design of the control. However we will re-consider this behavior one more time for the upcoming major release. Thank you for your feedback.

Kind regards,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
vin
Top achievements
Rank 1
answered on 02 Sep 2009, 12:46 PM
With my application i use the problem is the same. If a user clicks secound time on a already selected date the SelectedDate changes to 01.01.1980. Is there a way to avoid this? For example to to make it impossible that at one time no date is selected?


Greetings


EDIT: I'm using the workaround from this thread now. Problem solved
0
Boyko Markov
Telerik team
answered on 04 Sep 2009, 10:20 AM
Hello vin,

We have modified the default behavior of RadCalendar when it is used in RadDateTimePicker for the last version. RadCalendar selection is working on a toggle principle:

1. Clicking on some unselected cell selects it.
2. Clicking on a selected cell deselects it.

I'm happy that the workaround from the thread is resolving the issue. Please do not hesitate to contact us again if you need help.

All the best,
Boyko Markov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
TwoLaJit
Top achievements
Rank 2
Answers by
Boyko Markov
Telerik team
vin
Top achievements
Rank 1
Share this question
or