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

Allow MMM & MMMM in format #83

Closed
douglascantomelo opened this issue Jul 25, 2018 · 6 comments · Fixed by #172
Closed

Allow MMM & MMMM in format #83

douglascantomelo opened this issue Jul 25, 2018 · 6 comments · Fixed by #172
Assignees
Labels
enhancement New feature or request

Comments

@douglascantomelo
Copy link

douglascantomelo commented Jul 25, 2018

How set format date to "Jan 2018" for example?

            <DatePicker
              onChange={this.onChange}
              value={this.state.date}
              locale="pt-br"
              maxDetail="year"
            />
@Anlh
Copy link

Anlh commented Aug 13, 2018

I would also like to know if it's possible to change the current output format

@wojtekmaj
Copy link
Owner

wojtekmaj commented Aug 27, 2018

No, you can't do that at the moment. This is because currently all the fields are numeric and although it would be easy to implement displaying the date in "Jan 2018" format, saving it back to an actual Date() would be highly problematic. I explained a little more about locale approach in #90. I'd need to implement it in a form of a dropdown, but this way the date will not be easily written using the keyboard.

BTW you should have written locale="pt-BR", it's case sensitive :)

@wojtekmaj wojtekmaj self-assigned this Aug 27, 2018
@wojtekmaj wojtekmaj added the question Further information is requested label Aug 27, 2018
@isab
Copy link

isab commented Jul 8, 2019

+1 to this. It would be really helpful to be able to just display the month name at least.

@wojtekmaj wojtekmaj changed the title formatMonthYear Allow MMM & MMMM in format Jul 8, 2019
@wojtekmaj
Copy link
Owner

By popular demand... :> Both MMM (short month name) and MMMM (long month name) will be supported.

@wojtekmaj wojtekmaj added enhancement New feature or request and removed question Further information is requested labels Jul 8, 2019
wojtekmaj added a commit that referenced this issue Jul 8, 2019
wojtekmaj added a commit that referenced this issue Jul 8, 2019
@isab
Copy link

isab commented Jul 9, 2019

@wojtekmaj Since this isn't part of a release yet, how would I use this in my app right now? Thanks!

@wojtekmaj
Copy link
Owner

@isab It shouldn't take long for the next release, some manual testing remaining and that's all. Hold tight!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants