OpenMRS

React UI Library - Create Date Picker Component

We need to build a new date picker component which is configurable via props.

This component should act as the following components depending on the props passed.

  • Simple date picker : allows picking a single date.
  • Ranged date picker : allows picking a range of dates ("from" date and "to" date).
  • Date picker with time : should allow picking a time along with a date.
  • Ranged date picker with time : a date range with time.

Considerations:

  • IMPORTANT - Timestamps should be saved as ISO formatted strings. The best way to achieve this would be to save the timestamp as a MomentJS moment within the component. Thus we can format the moment to suit the requirement.
  • Must have the ability to disable date ranges.
  • Component should expose props to handle on change events - basically to retrieve the selected date/range.
  • Follow OpenMRS design theme - colors, fonts, icons. Use Material design icons if needed and available.
  • Try to customize an existing date picker / calendar component to fit our needs rather than reinventing the wheel. A good starting point would be rc-calendar. Your suggestions are welcome.
  • Follow the instructions at the repository (especially the Gitflow workflow) and the OpenMRS pull request tips.
  • This is a difficult task that requires careful design and considerable effort. Discuss your ideas with mentors.

Repository: https://github.com/merovingienne/openmrs-module-ui-react

Task tags

  • react
  • hard
  • ui
  • javascript

Students who completed this task

Matthew Whitaker, Bartłomiej Rasztabiga

Task type

  • code Code
  • web Design
close

2017