Datepicker input field: selected date is displayed despite value empty

I have a datepicker which the user can select a date from. When a date is selected, the input field is being filled with the right value, and it is displayed.

However, then submitting the form, the field posts empty data for that field, like it is only being displayed in the input field but it has no value.

I know it’s really hard to describe this issue, so I’m attaching some images.

Empty input field for datepicker

The date is selected and the input field shows the selected date

Empty value even if the field displayes a value