Feature or Bug?

4 posts, 1 answers
  1. TwoLaJit
    TwoLaJit avatar
    38 posts
    Member since:
    Nov 2006

    Posted 19 May 2009 Link to this post

    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?
  2. Answer
    Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 22 May 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. vin
    vin avatar
    1 posts
    Member since:
    May 2009

    Posted 02 Sep 2009 Link to this post

    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
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 04 Sep 2009 Link to this post

    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.
Back to Top