Skip to content

Set 12 hour time instead of 24 hour? #3748

Answered by rimzzlabs
rimzzlabs asked this question in Q&A
Discussion options

You must be logged in to vote

I've come with this props and it solve my problem

<ReactDatePicker
//... other props
dateFormat={props.properties.timeFormat === "12" ? "h:mm aa" : "HH:mm"}
timeFormat={props.properties.timeFormat === "12" ? "h:mm aa" : "HH:mm"}
 />

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rimzzlabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant