webform_datetime_24h
Adds language-aware 24-hour time formatting to Webform time and datetime elements, enhancing consistency on multilingual Drupal forms. Complies to language requirements in various bilingual and multilingual requirements.
Features
Webform Datetime 24h is a lightweight utility module for Drupal that enforces 24-hour time formatting on webform_time, time, and datetime elements rendered by Webform. It works by altering Webform submission forms based on the current interface language, allowing you to configure per-language enforcement of 24-hour time display. This is especially useful for multilingual sites where 12-hour formats (AM/PM) are inappropriate.
The module integrates cleanly with Webform and webform_jqueryui_datepicker to ensure time inputs are localized in a way that respects user expectations. Ideal for global or bilingual deployments, it requires no changes to individual Webform elements—just install, enable, and configure per language.
Post-Installation
Once installed, Webform Datetime 24h adds a configuration screen that allows you to enable 24-hour time formatting per language. There are no new content types, no fields to manage, and no manual changes needed to your Webforms.
Configuration Steps:
- Go to
Configuration → User Interface → Webform 24h Time FormatOr visit:/admin/config/user-interface/webform-datetime-24h - You'll see a list of all languages enabled on your site.
- For each language, check the box to enable 24-hour time formatting in Webforms.
- Save the configuration.
What Happens Next:
- The module automatically scans Webform submission forms for any webform_time, datetime, or time elements.
- If the current page language matches one you've enabled in settings, the module:
- Sets the time format to HH:mm (24-hour).
- Disables AM/PM toggles.
- Integrates with
webform_jqueryui_datepickerif installed, ensuring consistency across browsers.
Additional Requirements
- Webform
- jquery_ui_datepicker
webform_jqueryui_datepicker(included as a sub module in the webform module)
Similar projects
TBD
Supporting this Module
Please report issues and provide helpful steps to reproduce issues and enough background information that will help us understand how to assist you with the setup and support the module.
Community Documentation
The module comes with a README.md