10 Answers, 1 is accepted
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
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.
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
Hello, Don't know if Jason has his problem solved, but I am in the same case, need to not show the Year on my DatePicker (only month and day).
I've tried the solution above but it doesn't work.
Thanks for your help
I've tested the Daniela's solution and its works like a charm. Only the month is shown. However, if you want to show also the day you will need to use a bit different format. For example "MMMM - ddd" or "MMMM - d". I've attached a small example showing this approach. I hope it helps.
Regards,
Martin Ivanov
Progress Telerik
Hello, thanks for answering.
It effectively works but only on a RadCalendar, but as I need to use a RadDatePicker, this does'nt give any possibility to use the property.
Thank you for your help. As I am a biginner I maybe need more assistance :)
It seems that I am missing something here. Yes, the property is defined on the RadCalendar control which is used both in RadDateTimePicker and RadDatePicker. Both controls have the CalendarStyle property which you can use to set the MonthViewHeaderFormat property of the calendar. I've only changed the type of the control in my project from RadDateTimePicker to RadDatePicker and the format still works.
<
telerik:RadDatePicker
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
telerik:RadDateTimePicker.CalendarStyle
>
<
Style
TargetType
=
"telerik:RadCalendar"
>
<
Setter
Property
=
"MonthViewHeaderFormat"
Value
=
"MMMM - d"
/>
</
Style
>
</
telerik:RadDateTimePicker.CalendarStyle
>
</
telerik:RadDatePicker
>
As a small note on the CalendarStyle property, keep in mind that the RadDatePicker control hosts a RadCalendar (shown when the popup opens). The CalendarStyle property allows you to define a Style that will be passed to the RadCalendar control when the popup opens.
Regards,
Martin Ivanov
Progress Telerik
Hello, It works now, thank you
The difference was on the calendarstyle part, I was using RadDatePicker instead of RadDateTimePicker, now it works :)
Hello Siham,
If you can share your control's screenshot after removing the year, it would be of great help..
Just want to confirm whether this is what exactly our customers need.
Thanks.