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

How to display just month and day

1 Answer 36 Views
DateTimePicker
This is a migrated thread and some comments may be shown as answers.
Audrey
Top achievements
Rank 1
Audrey asked on 04 Jun 2013, 06:31 AM
Hi
Is there a property to make the DatePicker display just month and day?
I try  DateSelectionMode="Month" ,but year can still selected.
wish your help,thk

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 07 Jun 2013, 08:38 AM
Hi Audrey,

The desired behavior could be achieved through RadCalendar control which is part of RadDateTimePicker. As you don't have direct access to the Calendar ( because it is placed in a popup), you should customize the template of the DateTimePicker and edit the Calendar inside. You need to subscribe to the DisplayModeChanged event of the Calendar and to disable the YearView in its handler.

Please see the attached sample project for a reference. In it we've used Implicit Styles to style the DateTimePicker as this makes such customizations easier.

Hope this helps.

Regards,
Kalin
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DateTimePicker
Asked by
Audrey
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or