New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Selecting Month and Day with RadDatePicker
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
DateFormat
andDisplayDateFormat
properties of theDateInput
property 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
Calendar
element. For example, you can disable the row headers by settingUseRowHeadersAsSelectors
andShowRowHeaders
properties 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.