danielmoncada / date-time-picker-moment-adapter

Moment.js adapter for https://github.com/danielmoncada/date-time-picker
MIT License
5 stars 9 forks source link

Export MomentDateTimeAdapter #9

Closed Olusha closed 1 year ago

Olusha commented 2 years ago

MomentDateTimeAdapter should be exported in public-api.ts.

JoostK commented 1 year ago

To add some context as to why it's useful to have access to MomentDateTimeAdapter: we have a scenario where localization configuration is only available within sub-parts of the applications, resulting in us overriding OWL_DATE_TIME_LOCALE/OWL_DATE_TIME_FORMATS using Component.providers. Since these tokens are injected into MomentDateTimeAdapter we also need to create a new instance of that service at the component level, but there is no way to provide the service since MomentDateTimeAdapter is not exported.

danielmoncada commented 1 year ago

Thanks (and sorry for the late update). updated in latest version: https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker-moment-adapter

salimchemes commented 1 year ago

Sorry, i am still see MomentDateTimeAdapter not exported

JoostK commented 1 year ago

Hmm indeed, #10 was a noop change.

danielmoncada commented 1 year ago

yeah sorry guys.. not sure what happened with that (guessing I didn't save the file). here's the new PR: https://github.com/danielmoncada/date-time-picker-moment-adapter/pull/11

danielmoncada commented 1 year ago

new version up: https://www.npmjs.com/package/@danielmoncada/angular-datetime-picker-moment-adapter/v/2.2.0