angular / angular/components

Inline Datepicker with MatCalendar

Open
#8,812 8 comments 64 reactions 0 assignees View on GitHub
area: material/datepicker feature P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

For some case is it helpfully to have the datepicker as inline calendar.
But currently the datepicker is only available with on body tag, with a full page background layer for handle the close interaction.

Is it possible to inject the datepicker inline, or can this be a ne feature for the future?
One solution is to use the "mat-calendar" component, but its might be not official and a little bit hacky.

Like:
`
`
But its need to add more code in the *.ts file to update the view correctly.
Like the changed value:

`
getChangedValue(newDate) {
this.selDate = newDate
this.calendar['_activeDate'] = newDate;
this.calendar['monthView'] = false; // this line updates the calendar view
`

Any solution to use the code easier or to implement at the current state an inline datepicker?

Best regards,
Stephan

Contributor guide

Open the contributing guide

Research direction

Start by reading the issue's inline example and the existing datepicker and MatCalendar APIs. Determine whether an officially supported inline datepicker behavior is defined; done would require a decided scope and documented or tested support, rather than relying on private properties such as _activeDate or monthView.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.