Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Simple Time Field

252 sites No security coverage Drupal 10–11
View on drupal.org

This module provides a dedicated field type for storing and displaying time-of-day values, distinct from Drupal's full date and timezone handling. It allows for configuration of time intervals, offers flexible display formatting, and integrates with Feeds for importing various time string formats.

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.

Depends on

Dependencies of the latest stable release

  • field Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jan 2025
Latest release
6 months ago
Releases (12 mo)
2
Maintenance
Active

Release Timeline

Releases

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