Style and Appearance in Blazor Datetime Picker Component
13 Sep 20231 minute to read
The following content provides the exact CSS structure that can be used to modify the control’s appearance based on the user preference.
Customizing the appearance of Datetime Picker container element
Use the following CSS to customize the appearance of Datetime Picker container element.
/* To specify height and font size */
.e-input-group input.e-input, .e-input-group.e-control-wrapper input.e-input {
font-size: 20px;
height: 40px;
}
Customizing the Datetime Picker icons element
Use the following CSS to customize the Datetime Picker icons element.
/* To specify background color and font size */
.e-datetime-wrapper .e-input-group-icon.e-date-icon, .e-datetime-wrapper .e-input-group-icon.e-time-icon {
font-size: 16px;
background-color: blanchedalmond;
}
Customizing the time picker popup in the Datetime Picker
Use the following CSS to customize the time picker popup in the Datetime Picker.
/* To specify height */
.e-datetimepicker.e-popup {
height: 100px;
}
Full screen mode support in mobiles and tablets
The DateTimePicker component’s full-screen mode feature enables users to view the component popup element in full-screen mode on mobile devices with improved visibility and a better user experience. It is important to mention that this feature is exclusively available for mobile devices in both landscape and portrait orientations. To activate the full screen mode within the DateTimePicker component, simply set the FullScreen API value to true
. This action will extend the calendar and time popup element to occupy the entire screen on mobile devices.
@using Syncfusion.Blazor.Calendars
<SfDateTimePicker TValue="DateTime?" FullScreen=true></SfDateTimePicker>
Customizing the Calendar popup of the Datetime Picker
Check the below section to customize the style and appearance of the Calendar component in the Datetime Picker.