Search results

Prevent the popup close

The following examples demonstrates how to prevent the popup from closing.

Source
Preview
app.component.ts
app.module.ts
main.ts
import { Component } from '@angular/core';
import { PreventableEventArgs } from '@syncfusion/ej2-angular-calendars';

@Component({
    selector: 'app-container',
    template: `<ejs-datepicker (close)='onClose($event)' placeholder='Enter date'></ejs-datepicker>`
})
export class AppComponent {
    onClose(args: PreventableEventArgs): void {
        args.preventDefault();
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { DatePickerModule } from '@syncfusion/ej2-angular-calendars';
import { AppComponent } from './app.component';


/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        DatePickerModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);