Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DatePicker > Set DateSelection mode to year but I still want to select a day

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

Feed from this thread
  • Brock avatar

    Posted on Oct 10, 2011 (permalink)

    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

    Reply

  • Boyan Boyan admin's avatar

    Posted on Oct 10, 2011 (permalink)

    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 >>

    Reply

  • ClausDC avatar

    Posted on Jan 20, 2012 (permalink)

    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.

    Reply

  • Boyan Boyan admin's avatar

    Posted on Jan 25, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > DatePicker > Set DateSelection mode to year but I still want to select a day
Related resources for "Set DateSelection mode to year but I still want to select a day"

WPF DatePicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]