Unplanned
Last Updated: 02 Jan 2020 16:53 by ADMIN
Etra
Created on: 04 Feb 2019 11:35
Category: UI for ASP.NET AJAX
Type: Feature Request
2
YearPicker control
Is it possible to show only year options using MonthYearPicker? I would like to show a YearPicker.
1 comment
ADMIN
Rumen
Posted on: 04 Feb 2019 11:47
Thank you for your feature request!

For the time being the UI for ASP.NET AJAX suite does not offer such a standalone component, but there are CSS based techniques which allow modification and customization of the appearance of the RadMonthYearPicker to achieve the desired Year Picker appearance:

SOLUTION 1:
<style type="text/css">
    div.RadCalendarFastNavPopup {
        width: 105px !important;
        overflow: hidden;
    }
  
    table.RadCalendarMonthView_Default {
        width: 210px !important;
        margin-left: -115px;
    }
  
        table.RadCalendarMonthView_Default tr:nth-child(7) td.rcButtons {
            text-align: right !important;
        }
  
    .rcOkButton {
        margin-left: 20px;
    }
  
    div.RadCalendarFastNavPopup {
        width: 116px !important;
        left: 66.9792px !important;
    }
</style>
  
dasdsadasd<telerik:RadMonthYearPicker ID="RadYearSelection" runat="server" Width="100px" Skin="Default">
    <DateInput DateFormat="yyyy" DisplayDateFormat="yyyy">
    </DateInput>
</telerik:RadMonthYearPicker>


SOLUTION 2:
<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>

If you experience any issues with them, please provide reproduction steps and we will try to help you sorting them out.

Best regards,
Rumen
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.