@funidata/ngx-fudis
Version:
Funidata Design System.
30 lines (29 loc) • 1.39 kB
TypeScript
import { NativeDateAdapter } from '@angular/material/core';
import * as i0 from "@angular/core";
export declare class FudisDateAdapter extends NativeDateAdapter {
/**
* Original file:
* https://github.com/angular/components/blob/main/src/material/core/datetime/native-date-adapter.ts
*/
parse(value: any): Date | null;
format(date: Date, displayFormat: object): string;
/**
* Change the calendar starting day of the week from default 0 (Sunday) to 1 (Monday)
*/
getFirstDayOfWeek(): number;
/**
* Determines from displayFormat value if the Date value is coming from the input field or from
* the datepicker calendar. This ensures, that visible input value is always in Finnish DD.MM.YYYY
* format, but calendar uses HTML lang in other context.
*/
protected _selectLanguage(displayFormat: object): string;
/**
* @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have
* timeZone set to 'utc' to work fine
* @param date Date from which we want to get the string representation according to dtf
* @returns A Date object with its UTC representation based on the passed date info
*/
private _formatInputToDate;
static ɵfac: i0.ɵɵFactoryDeclaration<FudisDateAdapter, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<FudisDateAdapter>;
}