calibrate/timerange

This package is abandoned and no longer maintained. The author suggests using the calibrate/timerange package instead.

Time Range field

dev-8.x-4.x 2018-01-12 17:03 UTC

This package is auto-updated.

Last update: 2022-02-01 13:11:46 UTC


README

This module provides form element 'time' and 'Time Range' field.

Form element 'time'

Uses Input type="time" with min="00:00", max="23:59", pattern="[0-9]{2}:[0-9]{2}". See example at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time#Validation.

Time Range field

Field with start and end time. Both fields are optional, but end time won't be shown if start date is empty. Formatting, seperators, unit are customizable.

Examples:

  • Default output:
08:00 - 17:00 hour
  • Custom output:
08.00/17.00hr

or

08:00 / 17:00 hr

TODO

  • Field value validation on submit, as we rely on the format of 'hh:mm'.