Angular date time picker - MomentJs Adpater
This package supports Angular 18
This is a MomentJs adapter to be used with the following date time picker control:
https://github.com/danielmoncada/date-time-picker
npm install @danielmoncada/angular-datetime-picker-moment-adapter --save
import { NgModule } from '@angular/core';
import { OwlDateTimeModule, OWL_DATE_TIME_FORMATS} from '@danielmoncada/angular-datetime-picker;
import { OwlMomentDateTimeModule } from '@danielmoncada/angular-datetime-picker-moment-adapter';
// See the Moment.js docs for the meaning of these formats:
// https://momentjs.com/docs/#/displaying/format/
export const MY_MOMENT_FORMATS = {
parseInput: 'l LT',
fullPickerInput: 'l LT',
datePickerInput: 'l',
timePickerInput: 'LT',
monthYearLabel: 'MMM YYYY',
dateA11yLabel: 'LL',
monthYearA11yLabel: 'MMMM YYYY',
};
@NgModule({
imports: [OwlDateTimeModule, OwlMomentDateTimeModule],
providers: [
{provide: OWL_DATE_TIME_FORMATS, useValue: MY_MOMENT_FORMATS},
],
})
export class AppExampleModule {
}
Maintained and updated by Daniel Moncada, original implementatiom by Daniel Pan