Translate Date Format

In fact, there’s really one other thing about this widget:

Is there a way to change the prefilled indicators for days (DD), months (MM) and the Year (YYYY) to another language?
For example in the German market we use TT / MM / JJJJ

Best regards,
Leon

1 Like

Got you!

I’ll discuss it with our devs and let you know if anything can be done :slightly_smiling_face:

Great, thank you, I am looking forward to it! :slight_smile:

1 Like

Unfortunately, there is no option to customize the widget this way for now.

However, this is a good idea and we’ll try to consider it in our future updates. I’ve moved your request to our Wishlist where we’ll post all the updates :slightly_smiling_face:

Oh ok, I see, that’s a pitty, but maybe I will be lucky enough to see it in a future update :slightly_smiling_face: Thanks so far!! :+1:

1 Like

Thank you so much for sharing your thoughts with us, this is huge!

Hey everyone!

I am happy to say that our devs found a custom solution for this case.

To change the text of the Date Format, please add the script below to the Custom JS section on the Appearance tab of your widget’s settings:

const PLACEHOLDERS = ["TT", "MM", "JJJJ"];

const waitForElement = (selector, root = document) => new Promise(res => {
    let i = 0;

    const check = () => {
        const component = root.querySelector(selector);

        if (component) {
            res(component);
        } else if (i !== 150) {
            setTimeout(check, 100);
            i++;
        }
    };

    check();
});

waitForElement(".eapp-age-verification-item-allow-date-container").then(({ childNodes: inputs }) => {
  inputs.forEach((input, index) => {
    input.placeholder = PLACEHOLDERS[index];
  });
});

The date format is controlled in the 1st line of the script:

Note: Custom JS doesn’t function in the preview mode, so you can check the result right on your website

1 Like