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

Only Display Certain Months when DateSelectionMode=Month (aka SelectionMode = Quarter)

1 Answer 137 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Aaron
Top achievements
Rank 1
Aaron asked on 02 Aug 2012, 06:10 PM
I am using the DatePicker to allow selection of Quarters (1st Quarter 2012, 3rd Quarter 2013, etc).  Is there a way to only display some months when the DateSelectionMode=Month?  I only want to display Jan, Apr, Jul, Oct.  Something similar to the attached image.

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 07 Aug 2012, 09:50 AM
Hello Aaron,

In order to get the required behavior in the DatePicker control you will need to customize the CalendarStyle and create a custom MonthButtonStyleSelector. We prepared and attached a sample project for you representing the described approach. Notice that the non required months are not removed, but disabled. There is no way to completely remove them as the MonthButtons are put in an UniformGrid in code-behind and this behavior cannot be overridden.

Hope this is helpful to achieve the needed behavior.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker
Asked by
Aaron
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or