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

Setting both DisplayMode and DateSelectionMode in RadDatePicker

3 Answers 99 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Vittorio
Top achievements
Rank 1
Vittorio asked on 18 Apr 2011, 08:07 AM
Hello everybody,
I'd like a RadDatePicker to have the following behavior: when the dropdown calendar box opens, the calendar should be in the DecadeView. The user by clicking should arrive to the MonthView where the date is selected.

I was trying to achieve this by setting both DisplayMode = DecateView and DateSelectionMode = Month but it is not working: setting DateSelectionMode to Month causes the MonthView to be shown when the drop down calendar box is opened (the DisplayMode = DecateView seems to be ignored). Setting the DisplayMode = DecateView only, correctly sets the default view but of course the date is selected when the calendar is in DayView which is not what I really wanted.

What can I do to achieve the behaviour explained above?
Thanks you in advance.

3 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 21 Apr 2011, 09:11 AM
Hi Vittorio,

In order to select days DateSelectionMode should be Day. You have to use a Style in order to apply the DisplayMode to the Calendar of the DatePicker. Here is the sample code:
<telerik:RadDatePicker  DateSelectionMode="Day">
    <telerik:RadDatePicker.CalendarStyle>
        <Style TargetType="telerik:RadCalendar">
            <Setter Property="DisplayMode" Value="CenturyView" />
        </Style>
    </telerik:RadDatePicker.CalendarStyle>
</telerik:RadDatePicker>

I think this will suit your needs.

Regards,
Boyan
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Vittorio
Top achievements
Rank 1
answered on 21 Apr 2011, 10:49 AM
I'm sorry, my problem was not clearly explained...
I would like the date to be selected when the user clicks on the Month (so DateSelectionMode = Month) but I also would like the radcalendar to open in DecadeView by default (so DisplayMode = DecadeView setted in style as you suggested).

My problem is that setting DateSelectionMode to Month seems to cause DisplayMode = DecadeView to be ignored as the calendar opens in MonthView and not in DecadeView...

Is there a way to have DecadeView as the default DisplayMode and the date to be selected when the month is clicked by the user?
0
Boyan
Telerik team
answered on 26 Apr 2011, 12:14 PM
Hi Vittorio,

Thank you for the clarification, I have misunderstood you. Now I was able to reproduce the problem. This is a bug at our side. I have created a PITS item where you can follow the progress.

Sorry for the inconvenience caused, I have updated your Telerik points for the report.

Greetings,
Boyan
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
DatePicker
Asked by
Vittorio
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Vittorio
Top achievements
Rank 1
Share this question
or