<?php echo JHTML::_('behavior.calendar');
if (!isset($this->content->id))
$created_date = date("Y-m-d");
else
$created_date = $this->content->date_created;
$time = date('H:i:s',strtotime($created_date));
echo JHTML::_('calendar', $created_date, "date_created", "date_created", "%Y-%m-%d $time", null);
Bizzard not save backend for my personal component 3.7.5 > 3.8 help me save backend calendar value
Bizzard not save backend for my personal component 3.7.5 > 3.8 help me save backend calendar value
Labels |
Added:
?
|
Category | ⇒ | JavaScript |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-10-07 13:08:10 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-10-07 13:08:10 | ⇒ | 2017-10-07 13:08:11 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/18256
closed as no Core-Issue.
You need to use JForm and JForm API methods
if you do not use JForm API methods then you need to know what you are doing
e.g. if you your XML form file the field name is 'date_created'
then you should create the field like with form field name
jform[date_created]
so probably you would need
echo JHTML::_('calendar', $created_date, "jform[date_created]", "jform_date_created", "%Y-%m-%d $time", null);
also we do not know what is the type of field you have declared and what filtering you have applied
this is not a support forum (still i might have helped you above)
please post here:
https://forum.joomla.org/viewforum.php?f=509