Disable placeholder readonly in Angular Daterangepicker component

27 Apr 20242 minutes to read

Property Purpose
enabled The component can be restricted on a page, by setting enabled value as false which will disable the component completely from all user interactions including in form post action.
placeholder Using placeholder you can display a short hint about the expected value in the input element.
readonly Editing the value in the component can be prevented by setting readonly as true, but value can be included in the form post action.
import { NgModule } from '@angular/core'
import { FormsModule } from '@angular/forms'
import { BrowserModule } from '@angular/platform-browser'
import { DateRangePickerModule } from '@syncfusion/ej2-angular-calendars'




import { Component } from '@angular/core';

@Component({
imports: [
        
        FormsModule,
        DateRangePickerModule
    ],


standalone: true,
    selector: 'app-root',
    templateUrl: './template.html'
})
export class AppComponent {
    public value: Date[] = [new Date('1/1/2020'), new Date('2/1/2023')];
}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));