danielmoncada / date-time-picker

Angular Date Time Picker (Responsive Design)
https://daniel-projects.firebaseapp.com/owlng/date-time-picker
MIT License
141 stars 61 forks source link

Setting OWL_DATE_TIME_FORMATS custom formats does not work #62

Closed eladco898 closed 2 years ago

eladco898 commented 4 years ago

Hi, I have tried to set a custom moment formats in my app.module.ts but it does not work. Can someone provide a working example(maybe in a plunker) of OWL_DATE_TIME_FORMATS for Angular9?

Thanks

ZeSzymi commented 4 years ago

you have to provide the locale in app.module

import localeNb from '@angular/common/locales/nb';
import localeNbExtra from '@angular/common/locales/extra/nb';
import { registerLocaleData } from '@angular/common';

registerLocaleData(localeNb, localeNbExtra);
danielmoncada commented 3 years ago

@eladco898 is this an issue? Did you try what @ZeSzymi recommended?

eladco898 commented 3 years ago

No. You can close this issue