Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

simple_time_field

244 sites No security coverage
View on drupal.org

The Simple Time Field module provides a lightweight, dedicated time-of-day field type for any fieldable Drupal entity. Unlike Drupal core's date field, which bundles dates and timezones, this module focuses exclusively on the time component. It stores values in a standardized format (HH:MM or HH:MM:SS) and offers a wide range of configurable display options, making it the perfect solution for business hours, event schedules, and appointment slots.

Features

  • Pure Time Storage: Focuses strictly on time (00:00 to 23:59) without the overhead of date components or complex timezone conversions.
  • Native Browser Integration: Utilizes HTML5 time input elements for a seamless user experience, including support for min, max, and step attributes.
  • Flexible Granularity: Configure time intervals ranging from 1-second precision to 1-hour slots to match your specific use case.
  • Powerful Formatting: Ships with four formatters, including a highly configurable "Time (configurable format)" option that supports custom PHP date strings and display-only timezone shifting.
  • Feeds Integration: Automatically registers a Feeds target to normalize human-readable strings like "2pm" or "14:30" during imports.
  • Views Compatibility: Stored as a varchar string, allowing for reliable alphabetical sorting and filtering within Drupal Views.

Installation

The recommended installation method is via Composer to ensure all internal dependencies are correctly mapped.

composer require drupal/simple_time_field

Enable the module using Drush:

drush en simple_time_field
drush cr

Configuration Workflow

Setting up a time field is integrated directly into the standard Drupal Field UI:

  1. Add Field: Navigate to Structure » [Entity Type] » Manage fields and add a new field of type "Time".
  2. Storage Settings: Choose whether to Include seconds in the data storage.
  3. Manage Form Display: Click the gear icon on the field to set Minimum/Maximum time restrictions and the Time interval (step).
  4. Manage Display: Choose your preferred formatter (e.g., 12-hour AM/PM or 24-hour) and optional timezone offsets for output.

Feeds Integration

When the Feeds module is enabled, Simple Time Field provides a specialized mapper. It is designed to be "smart"—it attempts to parse arbitrary strings using strtotime(). This means you can import data from messy CSVs containing "2:30 PM" and have it correctly stored as "14:30" without manual pre-processing.

Additional Requirements

This module requires Drupal 9, 10, or 11. It has no mandatory external library dependencies. For import functionality, the Feeds module is recommended but optional.

Similar projects

  • Date (For full date/time stamps with timezone support)
  • Office Hours (Specifically tailored for weekly business opening slots)
  • Duration Field (For storing lengths of time rather than a specific time of day)

Supporting this Module

If you encounter bugs, require assistance with time pickers in specific browsers, or have feature suggestions, please use the official issue queue. We particularly welcome feedback on expanding the Feeds normalization logic or adding new preset formatters.

Activity

Total releases
4
First release
Jan 2025
Latest release
1 month ago
Release cadence
129 days
Stability
50% stable

Release Timeline

Releases

Version Type Release date
1.3.0 Stable Feb 20, 2026
1.3.x-dev Dev Feb 20, 2026
1.2.x-dev Dev Jan 28, 2025
1.2.1 Stable Jan 28, 2025