@spartacus/storefront
Version:
Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.
34 lines (33 loc) • 1.42 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { FormControl } from '@angular/forms';
import { DatePickerService } from './date-picker.service';
import * as i0 from "@angular/core";
/**
* Component that adds a date control. While the native date picker works in most
* modern browsers, some browsers need more guidance (placeholder), validation and
* date conversion.
*
* The data picker supports (optional) min and max form controls, so that you can
* limit the start and/or end date.
*
* Most of the implementation is done in the `DatePickerFallbackDirective`.
*/
export declare class DatePickerComponent {
protected service: DatePickerService;
constructor(service: DatePickerService);
control: FormControl;
min?: string;
max?: string;
update: EventEmitter<void>;
change(): void;
get placeholder(): string;
get pattern(): string;
/**
* Only returns the date if we have a valid format. We do this to avoid
* loads of console errors coming from the datePipe while the user is typing
* (in those browsers where the date picker isn't supported).
*/
getDate(date: string): string;
static ɵfac: i0.ɵɵFactoryDeclaration<DatePickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DatePickerComponent, "cx-date-picker", never, { "control": "control"; "min": "min"; "max": "max"; }, { "update": "update"; }, never, never>;
}