Different date format for display/value for JHtml/Calendar

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
sandormatyas
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Apr 20, 2021 8:56 am

Different date format for display/value for JHtml/Calendar

Post by sandormatyas » Wed Apr 28, 2021 7:02 am

There is a calendar in my custom script like this:
JHtml::_('calendar', $myDate, 'mydate', 'mydate', '%d %B %Y');
The site uses non-english locale and needs this format.
But I need this date as Y-m-d format to fetch data from database based on this date field.
What is the proper way handling with this?

Locked

Return to “Joomla! 3.x Coding”