Set DateSelection mode to year but I still want to select a day

4 posts, 0 answers
  1. Brock
    Brock avatar
    5 posts
    Member since:
    Jun 2011

    Posted 10 Oct 2011 Link to this post

    Hey,

    For a date of birth field it would be really nice to have the first "selection" screen to go to the year view but still be able to drill down from there to an actual "day".  At the moment I have to "drill up" to the years and then go all the way down again. 

    If I change the DateSelectionMode to "year" it does what I want in terms of the initial selection screen, but then I cant drill down to a day.

    Is there a way to do what I want?

    Thanks

    Brock
  2. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 10 Oct 2011 Link to this post

    Hello Brock,

    You can achieve what you want by setting DisplayMode=YearView in the RadCalendar style. Here is a sample code:
    <telerik:RadDatePicker>
        <telerik:RadDatePicker.CalendarStyle>
            <Style TargetType="telerik:RadCalendar" >
                <Setter Property="DisplayMode" Value="YearView" />
            </Style>
        </telerik:RadDatePicker.CalendarStyle>
    </telerik:RadDatePicker>
    This should work for your scenario.


    Greetings,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. ClausDC
    ClausDC avatar
    58 posts
    Member since:
    Feb 2010

    Posted 20 Jan 2012 Link to this post

    Any chance to extend this in such a way that DisplayMode resets to a specific view everytime the user opens the calendar view?

    As it is now, with the style from Boyan applied, it works one time but subsequent opening of the calendar view remembers the last selected DisplayMode.
  5. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 25 Jan 2012 Link to this post

    Hi Brock,

    Unfortunately this is a Calendar property and it is working this way. The YearView DisplayMode is set just  initially and then it is left to the View that the user as navigated to. I tried to workaround the problem by resetting the CalendarStyle on DropDownOpened event but with no success.

    All the best,
    Boyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top