DatePicker Timepicker is defaulting to current time. how do I control this behavior? #30580
Unanswered
danny-byrne
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
this is with DatePicker.showTime={true}
the behavior is this.
-initialized from a null state,
-pick a date
-automatically the time that is displayed and is saved if we hit 'ok' is the current time. We have to touch hour and minute fields to set to 'on the hour'
How can I default the time to 'on the hour' and not the current time?
I have tried passing
showTime={{ defaultValue: moment('00:00:00', 'HH:mm:ss') }}
as a prop to DatePicker, as is in the example in the docsand also,
if I change the time to something else, and then clear the field back to null, and then I pick a date again, the minutes field is automatically defaulted to the previous time we selected before we cleared.
I'm not seeing how I can further customize this behavior.
Beta Was this translation helpful? Give feedback.
All reactions