• Resolved bluff03

    (@bluff03)


    How to do I change the date to March 01, 2023. I changed the default date value to M d, Y but this did not work.

    When I look in the order details the date is still showing as 2023-03-01 in the custom fields section.

    It was working before I updated the plugin to the latest version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    Unfortunately, there is no option available to change the format of the HTML date type, the date field is an HTML date type field in which the format is depending upon the default date settings in the user system and the browser used.
     
    Please go through the below articles to know more about this.
     
    https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

    https://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format

    Thank you!

    Thread Starter bluff03

    (@bluff03)

    I might be asking my question wrong and I’ve added screen shots so you can see the three different date formats.

    I would like to be able to change the order detail custom date from 2023-03- to March 03, 2023 like I’ve managed to change the Order Date. It can be done manually but that’s not feasible to do for every order.

    You’ll also notice that the website checkout date is different again.

    The current date in the order detail custom field is not suitable to all countries and is confusing on reports and order emails.

    Plugin Author ThemeHigh

    (@themehigh)

    We do understand your concern.

    Please be informed that each browser will handle the date field in its own way. The displayed date is formatted based on the locale of the user’s browser, but the parsed value is always formatted yyyy-mm-dd.


    Unfortunately, we do not have any control over it.


    As an alternative, you can use custom code to transform an input text box into a Jquery UI date picker field and can change the format accordingly.

    You can accomplish this by following the steps listed below.

    1) Create a text field using our plugin.

    2) Enqueue the Jquery UI date picker script in the checkout page.

    3) Use jQuery code to convert the input text field into a UI date picker field.


    Further, a few code snippets can be found on Stack Overflow and other blogs. You can check the same for more details.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Date Default Value’ is closed to new replies.