material-components / material-components/material-components-android
[DatePicker] Generalize this to a Calendar component
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
The date picker is great and is useful to build a lot of apps. But as of now it's very specific and not as extendable as I hoped for. It's opinionated that it as to use a dialog-like component and lacks extensibility.
Solution I'd like
- Move the calendar portion out of the date picker and make the date picker a component that extends this Calendar component and implements only the picking features.
- Allow the Calendar component to be highly customizable: for instance, to allow picking and selecting dates, or to have drawables above, left, right and below, change/hide title, instead of flowing calendar using a swipe based calendar, allow/disable range-selection and other useful stuff.
Additional context
I brought this up during the Live Q&A that was held last week and from the response it seems like this tends to be the goal to atleast take out some parts to enable a level of re-usability. Making this issue here to track it as well. I would be happy to make PR and contribute code as well if the dev team can fixate on what kind of API they how for to allow this (my opinion would obviously differ... for example, I would entire make the calendar independent of dialogs/fragment/etc. first).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing DatePicker component and its dialog-related behavior. Define a reusable Calendar component and an API for the requested customization, with DatePicker providing only date-picking features; done means the calendar is reusable beyond the current dialog-oriented design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- design, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100