How to display only years in RadDatePicker Or RadDateTimePicker or RadMonthYearPicker

7 posts, 0 answers
  1. Du
    Du avatar
    4 posts
    Member since:
    Jun 2012

    Posted 20 Jun 2013 Link to this post

    Hi everybody,
    I want display only years in RadDatePicker or RadDateTimePicker or RadMonthYearPicker same Image attach, please check image and help me
    Thanks,

  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 25 Jun 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lee
    Lee avatar
    1 posts
    Member since:
    Nov 2013

    Posted 13 Jun 2014 Link to this post

    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>
  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 18 Jun 2014 Link to this post

    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.

     
  6. Manoj
    Manoj avatar
    26 posts
    Member since:
    Feb 2012

    Posted 20 Nov 2014 Link to this post

    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>
  7. Manoj
    Manoj avatar
    26 posts
    Member since:
    Feb 2012

    Posted 20 Nov 2014 in reply to Manoj Link to this post

    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>





  8. Javier
    Javier avatar
    16 posts
    Member since:
    Feb 2015

    Posted 09 Apr 2015 in reply to Manoj Link to this post

    Thanks guys,

     

    That css Save my day

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017