magento2.3 – Change date of birth date format in Magento 2.3

You do not need to amend the code to acheive this you can update the formatting for dates in magento by the following method

  1. Log in the Magento 2 Admin
  2. Click on the Store section on Admin sidebar.
  3. Under the Setting, Go to Configuration
  4. Expand the Catalog option and choose the catalog option
  5. Set the date and time format to your prefered format and save

This should give you the result your after. you may need to redeploy your website

bin/magento setup:static-content:deploy 

Also you may need to flush the cache

bin/magento c:f

This should now give you the result your after

if the above does work the only other way would be to create an overwrite of MagentoCustomerBlockWidgetDob and amend the getFieldHtml and getHtmlExtraParams functions to replace your with your specific date format