arqex / arqex/react-datetime

Allow function value for dateFormat and timeFormat

Open
#351 1 comment 0 reactions 0 assignees View on GitHub
enhancement
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
```

### Expected Results
It would add to flexibility of the component if we could supply a function for dateFormat and timeFormat props to implement display formatting not supported by moment.

This function would take the selected value as argument and return a string to be displayed.

A real world example where a format not supported by moment would be needed is a custom week of year formatting used by my company which doesn't correspond to any supported standards or localizations.

### Actual Results
Currently the component only takes a valid moment.js format string.

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.