this displayFormat:() =>moment.localeData().longDateFormat('L') ==> "MM/DD/YYYY"
but i need this format "DD/MM/YYYY" ??? so what is the code
i am give input as DD-MM-YYYY ex.. 13-09-2018 but calendar showing invalid date so i am trying to date display format
You should pass in:
displayFormat={() => "DD/MM/YYYY"}
Although your statement isn't terribly clear. What do you mean by:
i am give input as DD-MM-YYYY ex.. 13-09-2018 but calendar showing invalid date so i am trying to date display format
If you pass in a DD-MM-YYYY format date, that will be invalid unless you use that format.
is there any inputFormat attribute in this lib?
It's the displayFormat? That's what controls the allowed input format as well as what's actually displayed.
Can I set the format this way:
displayFormat={() => ["DD","MM","YYYY"]}
So that I have access to state props by an array
Most helpful comment
You should pass in:
Although your statement isn't terribly clear. What do you mean by:
If you pass in a
DD-MM-YYYYformat date, that will be invalid unless you use that format.