Custom field date of birth split into 3 form fields

The best UX one can provide to let users enter a date of birth is to have 3 input fields for day, month and year.
Now the keycloak server custom field expects only one value for the custom property “dob”.
I can think of a JS solution to have a hidden input for the custom field “dob” and 3 visible inputs that upon change write their respective value into the hidden field. So when the form is submitted the hidden field is also transferred with the correct date of birth.

But is there no other, non client side scripted way to combine 3 input fields into one custom field?