arqex / arqex/react-datetime

onChange should conform to existing form events.

Open
#394 7 comments 4 reactions 0 assignees View on GitHub
feature request
Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

### I'm Submitting a ...

```
[x] Bug report
[ ] Feature request
[ ] Support request
```

### Steps to Reproduce
`` returns souly a moment object which can not be handled by existing form onChange handlers

### Expected Results
onChange should return the normal form event WITH a moment parameter and the value set to the formatted Date time based on the dateFormat and timeFormat props. This will allow for existing code to work without specific changes to handle this special case. Events bubbling up are supposed to be enriched, or acted on and not replaced.

### Actual Results
onChange returns an unformatted moment object making the dev to format the DateTime upto 2 time in their code, once in the the element another time in the onChange event.

_Edit 7/08/2017:_ Enhanced the report with formatting petpeev

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.