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

feat(MatDateRangeInput): export MAT_DATE_RANGE_INPUT_PARENT with DatePicker Module #30238

Open
albahrawy opened this issue Dec 26, 2024 · 0 comments · May be fixed by #30247
Open

feat(MatDateRangeInput): export MAT_DATE_RANGE_INPUT_PARENT with DatePicker Module #30238

albahrawy opened this issue Dec 26, 2024 · 0 comments · May be fixed by #30247
Assignees
Labels
area: material/datepicker P4 A relatively minor issue that is not relevant to core functions

Comments

@albahrawy
Copy link

Feature Description

I'm trying to extend MatDateRangeInput component and I wanna provide MAT_DATE_RANGE_INPUT_PARENT to use my extended class instead,
the issue here is the MAT_DATE_RANGE_INPUT_PARENT is not exported with DatePicker Module, is the any chance to export it so it wll be easy to use it.

Thanks

Use Case

import {MAT_DATE_RANGE_INPUT_PARENT , MatDateRangeInput} from '@angular/material/datepicker';
// MAT_DATE_RANGE_INPUT_PARENT is not exported from datepicker

@component({
providers: [
{ provide: MAT_DATE_RANGE_INPUT_PARENT , useExisting: CSDateRangeInput },
],
})
export class CSDateRangeInput extends MatDateRangeInput{}

@albahrawy albahrawy added feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Dec 26, 2024
@albahrawy albahrawy changed the title feat(COMPONENT): MatDateRangeInput feat(MatDateRangeInput): export MAT_DATE_RANGE_INPUT_PARENT with DatePicker Module Dec 26, 2024
@crisbeto crisbeto self-assigned this Dec 29, 2024
@crisbeto crisbeto added P4 A relatively minor issue that is not relevant to core functions area: material/datepicker and removed feature This issue represents a new feature or feature request rather than a bug or bug fix needs triage This issue needs to be triaged by the team labels Dec 29, 2024
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 29, 2024
Previously we had to define an injection token for the `MatDateRangeInput` in order to avoid circular references. Now we can do the same with a type-only imports so we can simplify the setup.

Fixes angular#30238.
@crisbeto crisbeto linked a pull request Dec 29, 2024 that will close this issue
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 29, 2024
Previously we had to define an injection token for the `MatDateRangeInput` in order to avoid circular references. Now we can do the same with a type-only imports so we can simplify the setup.

Fixes angular#30238.
crisbeto added a commit to crisbeto/material2 that referenced this issue Dec 29, 2024
Previously we had to define an injection token for the `MatDateRangeInput` in order to avoid circular references. Now we can do the same with a type-only imports so we can simplify the setup.

Fixes angular#30238.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: material/datepicker P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants