I can see prestashop already has helper form of birthday field:
Find the file ../classes/form/CustomerFormatter.php
in line 196 change the setType('text') to setType('date'):
if ($this->ask_for_birthdate) {
$format['birthday'] = (new FormField())
->setName('birthday')
->setType('text') //change this to date
->setLabel(
$this->translator->trans(
'Birthdate',
[],
'Shop.Forms.Labels'
)
)
When I use that type birthday I got the populated field like prestashop 1.6 but, it doesn't work when saving. So, I think the birthday type is deprecated helper. Any help ?