fix(datepicker): export NgbDateStructAdapter #4335
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request, please make sure you have at least performed the following:
added/updated any applicable tests.added/updated any applicable demos.Summary
Hi :)
Thanks for building this great lib.
Currently, we use
NgbDatepicker
and theNgbDateNativeAdapter
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 theNgbDateAdapter
section. Let me know if I should make that more explicit.The same behavior is found with the
NgbDateISOParserFormatter
andNgbDateParserFormatter
as well asNgbCalendarGregorian
andNgbCalendar
. 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 :)