DateTimePicker: Select Month and Day without Year

4 posts, 1 answers
  1. Jason
    Jason avatar
    13 posts
    Member since:
    Jul 2010

    Posted 02 Jan 2012 Link to this post

    I'm building a rules engine that allows date constraints.  I want to be able to use a datetime picker to select the month and day, but I don't want to show the year.  Is this possible with your control?

    Jason
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 03 Jan 2012 Link to this post

    Hi Jason,

    I think what you need is simply custom formatting for the display date. Please, check the Formatting help article on RadDateTimePicker. I hope it helps. 


    Greetings,
    Dani
    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. Jason
    Jason avatar
    13 posts
    Member since:
    Jul 2010

    Posted 03 Jan 2012 Link to this post

    Thanks Dani.

    I am currently doing that, but I need the year not to show at the top of the calendar when the picker is clicked.  Attached is a picture of what I mean.
  5. Answer
    Dani
    Admin
    Dani avatar
    848 posts

    Posted 04 Jan 2012 Link to this post

    Hello Jason,

    You can then use the MonthViewHeaderFormat and assign it via the CalendarStyle property of RadDateTimePicker:

    <Style x:Key="CalendarStyle" TargetType="telerik:RadCalendar">
        <Setter Property="MonthViewHeaderFormat" Value="MMMM" />            
    </Style>

    I hope this will help solve the issue.

    Regards,
    Dani
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top