Add a defaultTime prop
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
### I'm Submitting a ...
```
[ ] Bug report
[x] Feature request
[ ] Support request
```
### Steps to Reproduce
Add a `defaultTime` prop to the element
```
```
### Expected Results
When clicking on a day in the calendar, if `defaultTime` is set, the datetime obtained should show the provided default time (in my example above: "23:59:59") instead of "00:00:00" as it currently does
### Actual Results
Nothing, hence the feature request
### Why?
I am using this component to make a DateTime **range** picker and I'd like the default times to be "00:00:00" for the "From" input, but "23:59:59" for the "To" input, yet I need the `defaultValue` to be `undefined` since I want to support open-ended ranges. Such a new feature would make this use-case really easy:
```
FROM:
TO
```
Contributor guide
Research direction
Start at the ReactDateTime component and trace what happens when a calendar day is selected and the time defaults to 00:00:00. Check the existing component tests, if present, and verify that defaultTime="23:59:59" is applied while behavior remains unchanged when the prop is omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100