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

How to display only years in RadDatePicker Or RadDateTimePicker or RadMonthYearPicker

6 Answers 998 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Du
Top achievements
Rank 1
Du asked on 20 Jun 2013, 10:02 AM
Hi everybody,
I want display only years in RadDatePicker or RadDateTimePicker or RadMonthYearPicker same Image attach, please check image and help me
Thanks,

6 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 25 Jun 2013, 07:33 AM
Hi,

I am sorry to say but with the current implementation of the controls the functionality illustrated can not be achieved. For now you can only display months and years using the RadMonthYearPicker.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Lee
Top achievements
Rank 1
answered on 13 Jun 2014, 10:00 AM
I came across this post as I required the same, only showing and selecting year.
You can use the following to achieve the desired effect.  Sizes and widths will be different for each skin, I was using the default skin.

<style type="text/css">

    div.RadCalendarFastNavPopup {
        width: 105px !important;
        overflow: hidden;
    }

    table.RadCalendarMonthView_Default {
        width: 210px !important;
        margin-left: -105px;
    }

    table.RadCalendarMonthView_Default tr:nth-child(7) td.rcButtons
    {
        text-align: right !important;
    }

    .rcOkButton {
        margin-left: 20px;
    }
</style>

<telerik:RadMonthYearPicker ID="RadYearSelection" runat="server" Width="100px">
    <DateInput DateFormat="yyyy" DisplayDateFormat="yyyy">        
    </DateInput>
</telerik:RadMonthYearPicker>
0
Angel Petrov
Telerik team
answered on 18 Jun 2014, 08:45 AM
Hi Lee,

It looks like I have misunderstood the initial requirement for which I apologize.

Thank you for sharing your solution with the community. I hope that others can benefit from it and follow the illustrated approach to achieve the desired effect.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Manoj
Top achievements
Rank 1
answered on 21 Nov 2014, 03:39 AM
Simple and Effective Solution.
 <style type="text/css">  
        #rcMView_Jan,
        #rcMView_Feb,
        #rcMView_Mar,
        #rcMView_Apr,
        #rcMView_May,
        #rcMView_Jun,
        #rcMView_Jul,
        #rcMView_Aug,
        #rcMView_Sep,
        #rcMView_Oct,
        #rcMView_Nov,
        #rcMView_Dec {
            display:none;
        }

    </style>
0
Manoj
Top achievements
Rank 1
answered on 21 Nov 2014, 03:41 AM
Simple and Effective Solution.
 <style type="text/css">  
        #rcMView_Jan,
        #rcMView_Feb,
        #rcMView_Mar,
        #rcMView_Apr,
        #rcMView_May,
        #rcMView_Jun,
        #rcMView_Jul,
        #rcMView_Aug,
        #rcMView_Sep,
        #rcMView_Oct,
        #rcMView_Nov,
        #rcMView_Dec {
            display:none;
        }

    </style> 


<telerik:RadMonthYearPicker Skin="Metro" ID="RadMonthYearPicker1" runat="server">
                <DateInput runat="server" DateFormat="yyyy" DisplayDateFormat="yyyy">
                </DateInput>
            </telerik:RadMonthYearPicker>





0
Javier
Top achievements
Rank 1
answered on 09 Apr 2015, 04:44 PM

Thanks guys,

 

That css Save my day

Tags
Calendar
Asked by
Du
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Lee
Top achievements
Rank 1
Manoj
Top achievements
Rank 1
Javier
Top achievements
Rank 1
Share this question
or