New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Selecting Month and Day with RadDatePicker
Updated over 6 months ago
Environment
| Product | Progress Telerik UI for ASP.NET AJAX |
|---|---|
| Version | all |
Description
To guide a user to select a month and a day without displaying the year using Telerik UI for ASP.NET AJAX, you can use the RadDatePicker control with a specific configuration.
Solution
Follow these steps to configure the RadDatePicker control:
- Add the RadDatePicker control to your page or form.
- Set the
DateFormatandDisplayDateFormatproperties of theDateInputproperty to "MMMM dd" to ensure that only the month and day part of the date is displayed in the input field. - Optionally, you can customize the appearance of the calendar by modifying the properties of the
Calendarelement. For example, you can disable the row headers by settingUseRowHeadersAsSelectorsandShowRowHeadersproperties to "False".
Here is an example of how you can configure the RadDatePicker control:
html
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" DateInput-DateFormat="MMMM dd" DateInput-DisplayDateFormat="MMMM dd">
<Calendar UseRowHeadersAsSelectors="False" ShowRowHeaders="False"></Calendar>
</telerik:RadDatePicker>
With this configuration, the RadDatePicker control will guide the user to select a month and a day without displaying the year.