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.
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.
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.