Having trouble getting help?
Contact Support
Contact Support
Disabled in Angular Color picker component
27 Apr 20241 minute to read
To achieve disabled state in ColorPicker, set the disabled
property to true
. The ColorPicker pop-up cannot be accessed in disabled state.
The following example shows the disabled
state of ColorPicker component.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { FormsModule } from '@angular/forms'
import { ColorPickerModule } from '@syncfusion/ej2-angular-inputs'
import { enableRipple } from '@syncfusion/ej2-base'
import { Component } from '@angular/core';
@Component({
imports: [
FormsModule, ColorPickerModule
],
standalone: true,
selector: 'app-root',
template: `<div class="e-section-control">
<h4>Disabled State</h4>
<!-- To disable ColorPicker. -->
<ejs-input ejs-colorpicker type="color" id="element" [disabled]="true" /></div>`
})
export class AppComponent { }
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));