Account details edit form: bug, if birthday month and day is entered, but not the year

Affected version
2.1.2

nocte

Well-known member
If a user has entered a month and day for the birthday inputs, they cannot edit the birthday anymore, but the input fields are still shown.

The reason is this part of the template account_details.

HTML:
                <xf:if is="{{ $xf.visitor.Profile.dob_day && $xf.visitor.Profile.dob_month && $xf.visitor.Profile.dob_year }}">
                    <xf:formrow
                        label="{{ phrase('date_of_birth') }}"
                        explain="{{ phrase('once_your_birthday_has_been_entered_it_cannot_be_changed') }}">

                        <xf:set var="$birthday" value="{{ $xf.visitor.Profile.getBirthday(true) }}" />
                        {{ date($birthday.timeStamp, $birthday.format) }}
                    </xf:formrow>
                <xf:else />
                    <xf:macro template="helper_user_dob_edit" name="dob_edit" arg-dobData="{$xf.visitor.Profile}" />
                </xf:if>
Possible fix: change first line of the code above.
HTML:
                <xf:if is="{{ $xf.visitor.Profile.dob_day && $xf.visitor.Profile.dob_month }}">
But I would find it even better, if a user who has already saved day and month could also save a year, if they want, later.
 
Top