Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JHTML::calendar generates an error with date format m-d-Y #8636

Closed
sakiss opened this issue Dec 9, 2015 · 2 comments
Closed

JHTML::calendar generates an error with date format m-d-Y #8636

sakiss opened this issue Dec 9, 2015 · 2 comments

Comments

@sakiss
Copy link
Contributor

sakiss commented Dec 9, 2015

This code produces an error

JHTML::calendar(
 '12-30-2015',
'something',
'something',
 '%m-%d-%Y'
);

This happens only with the date format %m-%d-%Y.
If you change the date format (e.g. %Y-%m-%d) and supply a date relative to that, works fine.

After some debugging i found out:

  1. No matter what date is supplied the value becomes 01-01-1970
  2. The error is generated by a code in the title of the text input
title="' . ($inputvalue ? static::_('date', $value, null, null) : '') 

file: libraries/cms/html/html.php
function: calendar
joomla version: 3.4.5

@Bakual
Copy link
Contributor

Bakual commented Dec 9, 2015

The $value needs to be always in english format (2015-12-30).
The $format may be a different non-english format. It specifies how the date will be displayed.

Closing as working as intended.

@Bakual Bakual closed this as completed Dec 9, 2015
@sakiss
Copy link
Contributor Author

sakiss commented Dec 10, 2015

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants