Date
A date picker field that allows users to select a date from a calendar interface, enhancing data entry for date-specific information.
Screenshots
Field render in form:
![]()
Field render in field group:
Configuration
-
Settings:
- Name: The label for the field.
- Slug: The unique technical identifier.
- Default value: Default date for the field.
-
Validation:
- Require: Determines if the field must be filled out.
-
Design:
- Instructions: Text displayed alongside the field providing details about the data needed.
- Width: The width of the field in the form.
- Classes: Custom CSS classes for styling the field.
- ID: Custom ID attribute for the field.
- Text before: Additional text displayed before the field.
- Text after: Additional text displayed after the field.
Return format
- Type: string or null (Y-m-d format)
Usage
/some-template.tpl
{* Object or Entity and Id *}
{assign var="data" value=$modules.customfieldgroups.data->get($product)}
{assign var="data" value=$modules.customfieldgroups.data->get('product', $product.id)}
<span class="date">{$data.field_group_slug.field_slug}</span>
/SomeClass.php
function someMethod()
{
$dataRetriever = DataRetrieverFacade::getInstance();
$data = $dataRetriever->get($object); // Object
$data = $dataRetriever->get('product', $idProduct); // Entity and id
$date = $data['field_group_slug']['field_slug'];
}

