'get date object from java and fill it in html input type date

For editing date I need to first autofill that date field from the date object I am getting from java How to do that

Date object from database

Html input type data

<div class="form-group">
                    <label>Date of Birth</label> <input type="date" name="dateOfBirth" class="form-control input-sm"
                                                        value="${customer.dateOfBirthType}">
                </div>
==================================================================

if (customer.getDateOfBirth() != null) {
               
               customerDto.setDateOfBirthType(customer.getDateOfBirth());
            }


    


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source