- Home
- Forum
- Angular - EJ 2
- How to increase height of list item in time dropdown of DateTime picker
How to increase height of list item in time dropdown of DateTime picker
Hi Team,
I am using syncfusion controls and as per theme requirement I need to increase the list item height a bit. For controls like DropDownList or Time picker control, I have set custom height in following classes:
.e-dropdownbase .e-list-item {
line-height: 32px!important;
min-height: 32px!important;
}
.e-timepicker .e-list-item {
line-height: 32px!important;
min-height: 32px!important;
}
How can I increase the list item height in case of Time dropdown shown for DateTimePicker.
(I have to increase each item height and not that of complete pop up)
Thanks
Tuaariq
SIGN IN To post a reply.
8 Replies
BC
Berly Christopher
Syncfusion Team
May 1, 2020 09:32 AM UTC
Hi Tuariq,
Greetings from Syncfusion support.
We can change the height of the items in the time popup inside the DateTimePicker component by overriding the below CSS styles.
|
[app.component.html]
<ejs-datetimepicker [cssClass]="cssClass"></ejs-datetimepicker>
|
|
[app.component.ts]
export class AppComponent {
public cssClass ="custom";
}
|
|
[app.component.css]
.custom.e-datetimepicker.e-popup .e-list-parent.e-ul .e-list-item{
line-height: 45px;
} |
Please find the sample from the below link.
Regards,
Berly B.C
TU
Tuariq
May 1, 2020 10:46 AM UTC
Hi Berly,
This solved my problem. Thanks a lot for the response.
Regards,
Tuariq
BC
Berly Christopher
Syncfusion Team
May 1, 2020 10:50 AM UTC
Hi Tuariq,
Most welcome. Please let us know If you need further assistance on this.
Regards,
Berly B.C
TU
Tuariq
May 1, 2020 05:03 PM UTC
Hi Berly,
Its very unusual, but using same class is solving pronlem in stackblitz as shared by you but changes can't be reflected when I am using in my existing project.
Its angular 6 project, using bootstrap theme and Calender version "@syncfusion/ej2-angular-calendars": "^18.1.44"
Could you suggest anything what might be the issue?
(occuring only in case of date time picker, where as in other syncfusion dropdown controls height got easily changed)
Thanks
Tuariq
TU
Tuariq
May 3, 2020 11:42 AM UTC
Hi Berly,
Attachment: DateTimePickerStyleBug_Zip_4f91b17c.zip
In support to my last reply, attaching the demo project in which the issue is getting reproduced.
Could you please help me out why I cannot override css classes in this demo?
Thanks
Tuariq
Attachment: DateTimePickerStyleBug_Zip_4f91b17c.zip
BC
Berly Christopher
Syncfusion Team
May 4, 2020 08:18 AM UTC
Hi Tuariq,
While checking the provided sample, you have missed to include the styleURL definition in the TS file to reflect the CSS changes. So, we suggest you to define the style URL in your application as mentioned below.
|
import { Component, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css'],
encapsulation: ViewEncapsulation.None
})
export class AppComponent {
public cssClass = "custom";
} |
Please find the modified sample from the below link.
Regards,
Berly B.C
TU
Tuariq
May 5, 2020 10:27 PM UTC
Hi Berly,
Thanks a lot for providing help.
I was missing "encapsulation: ViewEncapsulation.None"
The issue is resolved.
Regards,
Tuariq
BC
Berly Christopher
Syncfusion Team
May 6, 2020 04:05 AM UTC
Hi Tuariq,
Most welcome. Please let us know if you need further assistance on this.
Regards,
Berly B.C
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
TU Tuariq
- Apr 30, 2020 10:44 AM UTC
- May 6, 2020 04:05 AM UTC