User tests: Successful: Unsuccessful:
Pull Request for Issue #14306 .
on submit
listenerApply patch
Edit protostar template and insert somewhere inside the body:
<?php echo JHtml::_('calendar', JFactory::getDate()->format('Y-m-d'), 'date', 'date', '%Y-%m-%d', array('onChange' => "alert('it works')")); ?>
An alert with a message it works
should appear each time you change the date in the calendar
None, this is a bug
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries JavaScript |
Can you give me a hint how to get rid of the time?
There should be a attribute "showtime='false'" but it also does not work
Labels |
Added:
?
|
Try this:
<?php echo JHtml::_('calendar', JFactory::getDate()->format('Y-m-d'), 'date', 'date', '%Y-%m-%d', array(
'onChange' => "alert('it works')",
"showTime" => false,
"todayBtn" => true,
"weekNumbers" => false,
"fillTable" => true,
"singleHeader" => false,
)); ?>
I have tested this item
Insert <?php echo JHtml::_('calendar', JFactory::getDate()->format('Y-m-d'), 'date', 'date', '%Y-%m-%d', array('onChange' => "alert('it works')")); ?>
in /index.php
in template "protostar" after <div class="body" id="top">
(line 141) got:
@franz-wohlkoenig try in another position, e.g. inside the main after <main id="content" role="main" class="<?php echo $span; ?>">
@franz-wohlkoenig what is the problem, as the field renders successfully?
Labels |
Added:
?
|
@dgt41
thanks again, it works but with ' around the booleans
$attribs = array(
'onChange' => "alert('it works')",
"showTime" => 'false',
"todayBtn" => 'true',
"weekNumbers" => 'false',
"fillTable" => 'true',
"singleHeader" => 'false',
);
echo JHtml::_('calendar', JFactory::getDate()->format('Y-m-d'), 'date', 'date', '%Y-%m-%d', $attribs); ?>
I have tested this item
@chmst @infograf768 so do we need the quotes or not?
@franz-wohlkoenig that is the expected result, to test try to change the date and see if you get a popup with the text it works
@dgt41 , @infograf768
see the screens (don't mind the css .. I'm working on it)
Which screens?
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-03-03 12:48:21 |
Closed_By | ⇒ | wilsonge |
Merged :)
I have tested this item✅ successfully on cc5773c
Tested successfully and thank you :) saves my life.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14311.