Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(datepicker): export NgbDateStructAdapter #4335

Merged

Conversation

MaxKless
Copy link
Contributor

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md and DEVELOPER.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation. -> see notes
  • added/updated any applicable demos.

Summary

Hi :)
Thanks for building this great lib.

Currently, we use NgbDatepicker and the NgbDateNativeAdapter to track our models as native ES Dates globally across our project.
In a specific module, we wanted override this and use the standard behavior via NgbDateStructAdapter. However, this implementation isn't exported and thus, not accessible to us. Trying to import it results in a path like this and won't compile:

import { NgbDateStructAdapter } from '@ng-bootstrap/ng-bootstrap/datepicker/adapters/ngb-date-adapter';

I don't see a reason not to export it since it could profit some people (like our project) that want to use it outside of the default behavior.

This PR adds the NgbDateStructAdapter to it's modules exports.

Notes

I didn't update the API docs because the NgbDateStructAdapter is already mentioned in the NgbDateAdapter section. Let me know if I should make that more explicit.

The same behavior is found with the NgbDateISOParserFormatter and NgbDateParserFormatter as well as NgbCalendarGregorian and NgbCalendar. If you agree that these should be available from the outside , I can further add to this PR or make a new one. Just let me know :)

@maxokorokov maxokorokov merged commit a6e9f2e into ng-bootstrap:master Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants