1

I want to display a date of a birth calendar(create account page) as per store local. Any help appreciate

1

I solved this problem adding Magento\Framework\View\Element\Html\Calendar to the layout of required page.

For example in your customer_account_edit.xml layout you should add the following

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml" before="-"/>
        </referenceContainer>
    </body>
</page>

I know it's an old question but it's still actual and maybe could be useful for someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.