I am trying to:
I have a CRED form to edit/create a relationship. The relationship has several date/time fields, and these are shown in my CRED relationship form as so:
[cred-relationship-field name='coaching-session-datetime-30']
When these fields are displayed on the single CPT view, they are diplayed like so: [types field='coaching-session-datetime-90' style='text' format='Y–m–d h:i a'][/types], wrapped in a conditional that checks if the date not empty, and if the date is before TODAY()
Link to a page where the issue can be seen: hidden link (the coaching tab)
I expected to see:
The relationship date fields are optional. When I submit the relationship form with some empty date fields, I expect to see blank/empty date fields.
Instead, I got: 1970-01-01 12:00 am (the linux epoch).
Second issue - possibly related? When I add/edit the relationship on the WordPress backend, my dates are displayed on the frontend as: `2023–05–31 09:00 am`. This is correct.
If I use the frontend relationship form to add/edit the relationship, my dates are displayed as `2023–05–09 12:00 am 2023–05–09 12:00 am 1970–01–01 12:00 am` This is incorrect.
My relationship form looks like this:
```
[wpv-noautop]
[cred-relationship-form-container]
<!-- TRAINEE -->
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_child'>
[cred_i18n name='child-label']Trainee[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-role role='child' orderby='title' order='ASC' class='form-select' output='bootstrap']
</div>
</div>
<!-- NAME -->
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_parent'>
[cred_i18n name='parent-label']Coach[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-role role='parent' orderby='title' order='ASC' class='form-select' output='bootstrap']
</div>
</div>
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_coaching-session-datetime-30'>
[cred_i18n name='coaching-session-datetime-30-label']30 day[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-field name='coaching-session-datetime-30']
</div>
</div>
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_coaching-session-datetime-45'>
[cred_i18n name='coaching-session-datetime-45-label']45 day[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-field name='coaching-session-datetime-45']
</div>
</div>
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_coaching-session-datetime-60'>
[cred_i18n name='coaching-session-datetime-60-label']60 day[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-field name='coaching-session-datetime-60']
</div>
</div>
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_coaching-session-datetime-90'>
[cred_i18n name='coaching-session-datetime-90-label']90 day[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-field name='coaching-session-datetime-90']
</div>
</div>
<div class='row mb-4'>
<div class='col-12 col-md-3 col-lg-2 text-md-right text-md-end'>
<label class='form-label fw-bold m-0 align-items-center' for='%%FORM_ID%%_coaching-session-datetime-135'>
[cred_i18n name='coaching-session-datetime-135-label']135 day[/cred_i18n]
</label>
</div>
<div class='col-12 col-md-9 col-lg-10'>
[cred-relationship-field name='coaching-session-datetime-135']
</div>
</div>
<div class="row">
<div class="col-12 text-center">
[cred-form-submit field='submit' name='submit' class='btn btn-trainee']
[cred-form-cancel field='cancel' name='cancel' class='btn btn-light']
</div>
</div>
[/cred-relationship-form-container]
[/wpv-noautop]
```