react-datetime icon indicating copy to clipboard operation
react-datetime copied to clipboard

timeFormat not applied

Open martinvondracek opened this issue 9 years ago • 4 comments

when I put custom time format, the format is applied in input field but is not applied in timepicker dropdown

<Datetime dateFormat={false} timeFormat={'hh:mm a'} viewMode={'time'} />

demo here

timepicker

martinvondracek avatar Dec 20 '16 17:12 martinvondracek

Hi @martinvondracek. If you change the timeFormat string to 'hh:mm A' - does it solve your issue?

simeg avatar Dec 20 '16 19:12 simeg

Hi @simeg, yes it works with 'hh:mm A' but unfortunately I need with small 'a' - 'h:mm a'

martinvondracek avatar Dec 20 '16 21:12 martinvondracek

This seems to be a bug, looking into it. Here's an example of where it gets wrong.

simeg avatar Dec 20 '16 22:12 simeg

@martinvondracek this has now been fixed with the following commit: https://github.com/YouCanBookMe/react-datetime/commit/cf1e721e0d7c69b5ce55978c213ef463ab477ebc

The bug fix is published in version 2.8.1. Thanks.

simeg avatar Dec 21 '16 00:12 simeg