Calendar date decreasing

49 views
Skip to first unread message

Rener Castro

unread,
Feb 20, 2016, 2:21:17 PM2/20/16
to Joomla! General Development
Hi,

My form field calendar on administration site is decreasing every time I save the template. This is very annoying, because I have many calendar fields to input data on my template.

Please, someone help me to fix this.

Regards,
Rener Castro

Bakual

unread,
Feb 24, 2016, 1:38:34 AM2/24/16
to Joomla! General Development
Joomla converts by default every date/time entered to UTC before saving. This means the date saved can be the day before depending on timezone settings.
When showing the date again, the timezone needs to be accounted again. JHtml::date does that by default as well.

Now the question is how you specified the date field and how you're outputting the date.

Mark Dexter

unread,
Feb 24, 2016, 1:19:11 PM2/24/16
to Joomla! General Development
Do you have the attribute filter="user_utc" in the XML form file? I had the same problem in an option with type="calendar". It would save in UTC but not convert back to the local time zone on load, so every time I saved it was moving the time/date. Adding that attribute fixed the problem.

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send email to joomla-de...@googlegroups.com.
Visit this group at https://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages