Simplify get value logic (#288)
Simplify get value logic (#288)

* Add getValuePiece helper to avoid code repetition

* Add getDetailValue helper to avoid code repetition

* Simplify argument list

* Fix error

* Fix ESLint issues

wojtekmaj/react-calendar,wojtekmaj/react-calendar,wojtekmaj/react-calendar