How can I change the dateformat for calendar inputs?
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 26
- Joined: 16 Oct 2023, 15:05
How can I change the dateformat for calendar inputs?
Currently, the input dates are having the format YYYY-MM-DD. I would like to change it to MM-DD-YYYY. What is the best way to do this?
Re: How can I change the dateformat for calendar inputs?
For the admin backend, you can overwrite the Flatpickr configuration in the themes/admin/custom.js file of your own extension:
https://github.com/aimeos/ai-admin-jqad ... in.js#L105
https://github.com/aimeos/ai-admin-jqad ... in.js#L105
Code: Select all
Aimeos.flatpickr.date.altFormat = 'M j, Y';
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 26
- Joined: 16 Oct 2023, 15:05
Re: How can I change the dateformat for calendar inputs?
Thanks for the response. I came across this js file while debugging but I could not find a way to overwrite the file as this file is in vendor folder in Laravel. Could you please help to suggest the best way to overwrite this file/js code?
Re: How can I change the dateformat for calendar inputs?
In ./packages/<yourextension>/themes/admin/custom.js
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star