@jsonforms/angular-material
Version:
Material Renderer Set for Angular module of JSON Forms
28 lines • 1.17 kB
TypeScript
import { NativeDateAdapter } from '@angular/material/core';
import * as i0 from "@angular/core";
/**
* date adapter for dayjs to parse and format dates
*/
export declare class DayJsDateAdapter extends NativeDateAdapter {
saveFormat: string;
setSaveFormat(format: string): void;
/**
* parses a given data prop string in the save-format into a date object
* @param value date string to be parsed
* @returns date object or null if parsing failed
*/
parseSaveFormat(value: string): Date | null;
parse(value: string, format: string): Date | null;
toSaveFormat(value: Date): string;
/**
* transforms the date to a string representation for display
* @param date date to be formatted
* @param displayFormat format to be used for formatting the date e.g. YYYY-MM-DD
* @returns string representation of the date
*/
format(date: Date, displayFormat: string): string;
deserialize(value: any): Date | null;
static ɵfac: i0.ɵɵFactoryDeclaration<DayJsDateAdapter, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<DayJsDateAdapter>;
}
//# sourceMappingURL=dayjs-date-adapter.d.ts.map