Timestamp nullable
20 sites
No security coverage
This module provides a timestamp field widget that allows users to preserve empty values as NULL instead of automatically defaulting to the current date and time. It offers content editors more control over timestamp fields, acting as a replacement for Drupal core's default widget.
Provides a timestamp field widget that allows empty values to be preserved as NULL/empty values instead of defaulting to the current date and time.
Drupal core's `Datetime Timestamp` widget automatically sets empty timestamp fields to the current time on form submission. This module provides an alternative widget that gives content editors explicit control over whether a timestamp value is set.
Features
- Drop-in replacement for core's Datetime Timestamp widget
- Configurable behavior: choose whether empty values default to current time (existing core behavior) or are handled as NULL/empty
Post-Installation
- Navigate to the "Manage form display" tab for your entity type
- Select "Datetime Timestamp (Nullable)" as the widget for your timestamp field
- Click the gear icon to configure whether empty values should default to current time or remain NULL