Material-ui-pickers: [DatePicker] Make possible to hide year view

Created on 28 Apr 2019  路  7Comments  路  Source: mui-org/material-ui-pickers

Hi Material-UI-Pickers team!

I love your date picker, but my app has a special use case.

My app allows people to set occasions for family and friends, like birthdays, holidays, etc. I don't want them to actually be able to select the year, just month and date. Once they select a month and date, the app will just take into account what today's date is and act accordingly.

So I really want a mode for the DatePicker component that only allows users to select day/month. Is this possible? I would love to contribute to the project and submit a PR for this if you would prefer.

Thanks!
Lukas

enhancement important

Most helpful comment

I know this is marked as closed, but I still don't see the datepicker hiding the year from the view when I use : views={['month', 'date']}

Is there something I am missing?

All 7 comments

I see, for now it is not possible, we will extend views functionality to make it works as expected

Fixed in 3.0.0

@dmtrKovalenko @LukasDeco
Maybe this is a workaround see right
https://material-ui-pickers.dev/demo/datepicker

Screen Shot 2019-07-08 at 7 33 36 PM

I know this is marked as closed, but I still don't see the datepicker hiding the year from the view when I use : views={['month', 'date']}

Is there something I am missing?

@dmtrKovalenko Me too. I do not see the effect of views prop on the date picker. Any other things needs to be configured?

Hello! I know that almost a year has passed since the last comments, but I try to use views={['month', 'date']} but it does not work as expected. I can still see the year there :( How can I create a picker with only month and day selectable? Did you manage to solve that issue @LukasDeco @psamim ?

@TomekStaszkiewicz Do you have a reproduction with v4.0.0-alpha.8? Do you want to open a new issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StevenRasmussen picture StevenRasmussen  路  3Comments

callmeberzerker picture callmeberzerker  路  3Comments

Lysander picture Lysander  路  3Comments

danmce picture danmce  路  3Comments

killjoy2013 picture killjoy2013  路  3Comments