This project is not covered by Drupal’s security advisory policy.
Provides a field widget and a set of field formatters for date range field types to allow editors to set that a date has no time, meaning that it place all the day.
Similar functionality of date_all_day module in drupal 7 that is part of the date project, ported to drupal 8.
This module uses the daterange field type from core, which have start and end dates. To make the end date optional, please check the following core issue: #2794481: Allow end date to be optional
Notes on the 2.x release
The new major version is to switch to semantic versioning without having version conflicts with the existing 8.x-1.x release. This version is the first with support for Drupal 10 and upper and with support for the Claro admin theme, but there shouldn't be breaking changes. Sites can upgrade by executing:
composer require drupal/date_all_day:^2.0
Usage:
Go to Structure > Content Types (or any other fieldable entity) > manage fields and add a new field of type Datetime Range.
Under field settings, select "Date and time". No other date types are supported.
Go to Manage form display and select "Date and time range with All day".
Go to Manage display and select "Default (All day)" or "Custom (All day)" for your daterange field and configure the field formatter as needed. You can choose 2 date formats for the date with and without time. It should be pre-configured by default, but you can create your custom date formats under Configuration > Regional and language > date and time formats to adapt it to your needs.
Project information
- Module categories: Content Editing Experience, Site Structure
- 4,387 sites report using this module
- Created by akalam on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.