Can I use React-DateTime-Picker as a date picker conditionally? #182
Answered
by
wojtekmaj
TecSachinGupta
asked this question in
Q&A
-
|
Can we use the DateTime picker as a date picker based on property? |
Beta Was this translation helpful? Give feedback.
Answered by
wojtekmaj
Mar 21, 2022
Replies: 1 comment
-
|
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 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wojtekmaj
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
formatprop, e.g."dd.MM.yyyy". The only gotcha you need to watch out for is that the hour passed in Date() instance you get inonChangewill be pretty unpredictable.