@danielmoncada/angular-datetime-picker-dayjs-adapter
TypeScript icon, indicating that this package has built-in type declarations

2.1.1 • Public • Published

Angular Date Time Picker (DayJs Adapter)

npm npm

Angular date time picker - DayJs Adpater

This package supports Angular 9/10/11/12/13/14/15/16

Description

This is a DayJs adapter to be used with the following date time picker control:

https://github.com/danielmoncada/date-time-picker

How to Use

  1. Install with npm:npm install @danielmoncada/angular-datetime-picker-dayjs-adapter --save
  2. import { NgModule } from '@angular/core';
    import { OwlDateTimeModule, OWL_DATE_TIME_FORMATS} from '@danielmoncada/angular-datetime-picker;
    import { OwlDayJsDateTimeModule } from '@danielmoncada/angular-datetime-picker-dayjs-adapter';
    
    // See the Day.js docs for the meaning of these formats:
    // https://day.js.org/docs/en/display/format
    export const MY_DAYJS_FORMATS = {
        parseInput: 'l LT',
        fullPickerInput: 'l LT',
        datePickerInput: 'l',
        timePickerInput: 'LT',
        monthYearLabel: 'MMM YYYY',
        dateA11yLabel: 'LL',
        monthYearA11yLabel: 'MMMM YYYY',
    };
    
    @NgModule({
        imports: [OwlDateTimeModule, OwlDayJsDateTimeModule],
        providers: [
            {provide: OWL_DATE_TIME_FORMATS, useValue: MY_DAYJS_FORMATS},
        ],
    })
    export class AppExampleModule {
    }

Dependencies

  • dayjs
  • @danielmoncada/angular-datetime-picker
  • tslib

Demo

License

  • License: MIT

Author

Maintained and updated by Daniel Moncada, original implementatiom by Daniel Pan

Package Sidebar

Install

Weekly Downloads

155

Version

2.1.1

License

MIT

Unpacked Size

232 kB

Total Files

20

Last publish

Collaborators

  • danielmoncada