On Firefox, the date input field is displayed as a text input field. However, when a user clicks on the date text, the date picker calendar appears. In Firefox, this is expected behavior.
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.3 |
Current |
TBC |
General
-
Safari treats the type=date input field as a plain text input field.
-
The SFDC date value is in the YYYY-MM-DD format
-
When the portal frame detects the Safari browser and renders a date field, it uses the field-level configuration to convert the date value from the SFDC format to a more user-friendly format, e.g.,
"fieldUi": { "settingsOptions": { "fieldFormat": "MM/DD/YYYY" } }
-
Save action converts the date string typed by a user to the SFDC format automatically before it sends to the backend because it uses the actor structure and can thus access the fieldFormat configuration.
-
Submit action, on the other hand, needs each date field in the remoteActionArguments to be explicitly configured as follows:
"remoteActionArguments": { "account": { "expiry": "$this.attr(SLAExpirationDate__c, sfdcdate, 'MM/DD/YYYY');", ...
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.3 |
Current |
TBC |
General
-
By using
fieldUi: settingsOptions: fieldFormat
, the read-only date value can be presented in a user-friendly format as well -
Can be used to get rid of the time-zone issue.
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.3 |
Current |
TBC |
Default Value
$date
General
-
startYear
can be an absolute year as a number or a relative year value as a string ("+2", or "-5") -
endYear
can be an absolute year as a number or a relative year value as a string ("+2", or "-5") -
If not specified,
startYear
will be 1700 andendYear
will be 4000 (according to SFDC date range)
Example 8. Code JSON
"validation": [{ "rule": "$date", "date": { "isFutureDate": boolean, "isPastDate": boolean, "includeToday": boolean, "startYear": number | string, "endYear": number | string, }, "message": "Invalid date"}],
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.3 |
Current |
TBC |
Default Value
$age
Code JSON
"validation": [{ "rule": "$age", "age": { "minAge": number, "maxAge": number, }, "message": "Invalid age"}],
Status
Release Available |
Status |
Framework Name |
---|---|---|
3.5 |
Current |
TBC |
General
-
From 3.5, the date format uses the format specifications from
date-fns
https://date-fns.org/v2.16.1/docs/formatNote
Moment format is no longer supported.
-
If the date format does not follow the
date-fns
format, the date is displayed as the Salesforce format ofyyyy-mm-dd
, e.g., 2020-05-10, which can be used as an indicator that your current date format configuration needs to be updated to thedate-fns
format.