This is the icon inside the button, that we click to open the Calendar in the Kendo Date Picker
This can be seen in simple angular app with Kendo Date Picker
This is the icon inside the button, that we click to open the Calendar in the Kendo Date Picker
This can be seen in simple angular app with Kendo Date Picker
On
Yes!
You can create a custom IconService that inherits the IconSettingsService provided by Kendo Angular suite.
Then you can overwrite the internal getCustomFontIconClass function and replace the default calendar icon of the DatePicker (or any other component icon) with any CSS classes.
import { IconSettingsService } from '@progress/kendo-angular-icons';
@Injectable()
export class MyIconService extends IconSettingsService {
private iconDictionary: { [key: string]: string } = {
calendar: 'fa fa-taxi',
};
public getCustomFontIconClass(iconName: string): string {
return (
this.iconDictionary[iconName] || super.getCustomFontIconClass(iconName)
);
}
}
Don't forget to register the custom IconService in the module.
import { IconSettingsService, IconsModule, ICON_SETTINGS } from '@progress/kendo-angular-icons';
providers: [
{ provide: ICON_SETTINGS, useValue: { type: 'font' } },
{ provide: IconSettingsService, useClass: MyIconService },
],
More details and a runnable demo can be found in the following section of the Icons documentation:
https://www.telerik.com/kendo-angular-ui/components/icons/icon-settings/#toc-font-icons
Here is an example demonstrating how to replace the DatePicker icon with a fa fa-taxi FontAwesome icon:
You could override the css for the span that includes the icon:
DEMO