Material-ui-pickers: this.props.getFormatString is not a function

Created on 9 Feb 2019  路  3Comments  路  Source: mui-org/material-ui-pickers


A GIF or MEME to give some spice of the internet

Environment

I am using Ubuntu 18.04.
| Tech | Version |
|---------------------|---------|
| material-ui-pickers | ^2.2.0 |
| material-ui | ^3.8.1 |
| React | 16.7.0 |
| Browser | Chrome |
| Peer library | [email protected] |

Steps to reproduce

  1. Use Datepicker for selecting date in dd/mm/yyyy
  2. use format attribute and use this.props.getFormatString function and pass js {moment: 'DD/MM/YYYY'}
  3. Error will be this.props.getFormatString is not a function

Expected behavior


Should show the date in given format

Actual behavior

Live example

docs

Most helpful comment

@dmtrKovalenko atleast you should put a comment there.

All 3 comments

this.props.getformatstting is used only on the docs to support different libs at once. You need to pass a string directly to the component.

@dmtrKovalenko atleast you should put a comment there.

Totally agree with @aditya81070 , it isn't clear that! i ran into the same problem

Was this page helpful?
0 / 5 - 0 ratings

Related issues

callmeberzerker picture callmeberzerker  路  3Comments

idrm picture idrm  路  3Comments

sakulstra picture sakulstra  路  3Comments

filipenevola picture filipenevola  路  4Comments

danmce picture danmce  路  3Comments