Skip to content

Can I use React-DateTime-Picker as a date picker conditionally? #182

Answered by wojtekmaj
TecSachinGupta asked this question in Q&A
Discussion options

You must be logged in to vote

That is a pretty unusual use case for React-DateTime-Picker and I do recommend using React-Date-Picker, still, but I think you can totally pull this off by providing custom format prop, e.g. "dd.MM.yyyy". The only gotcha you need to watch out for is that the hour passed in Date() instance you get in onChange will be pretty unpredictable.

Replies: 1 comment

Comment options

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