Error using datelist for field: contact's date of birth

Created on 8 June 2023, over 1 year ago
Updated 23 July 2023, over 1 year ago

1.0 Problem/Motivation
When the contact's date of birth field is set as a datelist element, the date is incorrectly recorded in the contact

2.0 Detailed steps to reproduce (embed screenshots)
- Create webform with contact's date of birth. The webform is completed with the date of birth: '01/07/1984':

- In CiviCRM the contact has a wrong date of birth

3.0 Proposed resolution
Replace the following line: https://git.drupalcode.org/project/webform_civicrm/-/blob/6.2.4/src/Webf...
For: $val = empty($val[0]) ? '' : str_replace('-', '', substr($val[0], 0, 10));

🐛 Bug report
Status

Postponed: needs info

Version

6.2

Component

CiviCRM Data Handling

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024