?
avatar chmst
chmst
11 Mar 2017

Steps to reproduce the issue

Add the attribute onchange="this.form.submit" to a calendar field or make a calendar like this:

echo JHtml::_('calendar', JFactory::getDate()->format('Y-m-d'), 'date', 'date', '%Y-%m-%d', array('onChange' => 'this.form.submit();'));

Try to select a Time with hours and minutes.
This is not possible. You can select either a hour or minutes, but not both, as the onChange event is triggered with the first selection.

avatar chmst chmst - open - 11 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Mar 2017
avatar zero-24 zero-24 - edited - 11 Mar 2017
avatar zero-24 zero-24 - change - 11 Mar 2017
Title
Calendar with onchange=this.form.submit: Tme selection is not possible
Calendar with onchange=this.form.submit: Time selection is not possible
avatar dgt41
dgt41 - comment - 11 Mar 2017

Hmm, that's tricky, onChange fired when something is changed (basically this event makes sense for inputs and selecting a date, time has 2 or 3 inputs [hour, mins, am/pm as select elements] so it correctly fires when only one of these is changed)

avatar dgt41
dgt41 - comment - 11 Mar 2017

Said that, what you can do is do some checking before submitting the form.

avatar chmst
chmst - comment - 11 Mar 2017

I'll find a solution for me :) but maybe others will find this issue too.
We could say - if onChange is in the attributes: Or make a submit button when rendering the calendar and remove the attribute?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14486.
avatar joomla-cms-bot joomla-cms-bot - change - 11 Mar 2017
Title
Calendar with onchange=this.form.submit: Tme selection is not possible
Calendar with onchange=this.form.submit: Time selection is not possible
avatar joomla-cms-bot joomla-cms-bot - edited - 11 Mar 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Mar 2017
Category com_fields
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2017
Title
Calendar with onchange=this.form.submit: Time selection is not possible
Calendar with onchange=this.form.submit: Tme selection is not possible
avatar joomla-cms-bot joomla-cms-bot - change - 30 Mar 2017
Title
Calendar with onchange=this.form.submit: Time selection is not possible
Calendar with onchange=this.form.submit: Tme selection is not possible
avatar joomla-cms-bot joomla-cms-bot - edited - 30 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2017
Title
Calendar with onchange=this.form.submit: Tme selection is not possible
Calendar with onchange=this.form.submit: Time selection is not possible
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2017
Title
[com_fields] Calendar with onchange=this.form.submit: Tme selection is not possible
Calendar with onchange=this.form.submit: Time selection is not possible
avatar joomla-cms-bot joomla-cms-bot - edited - 4 Apr 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2017
Priority Medium Low
Status New Needs Review
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Title
Calendar with onchange=this.form.submit: Time selection is not possible
[com_fields] Calendar with onchange=this.form.submit: Tme selection is not possible
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2017
Title
Calendar with onchange=this.form.submit: Tme selection is not possible
[com_fields] Calendar with onchange=this.form.submit: Tme selection is not possible
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Title
[com_fields] Calendar with onchange=this.form.submit: Time selection is not possible
[com_fields] Calendar with onchange=this.form.submit: Tme selection is not possible
avatar joomla-cms-bot joomla-cms-bot - edited - 7 Apr 2017
avatar joomla-cms-bot joomla-cms-bot - change - 7 Apr 2017
Title
[com_fields] Calendar with onchange=this.form.submit: Tme selection is not possible
[com_fields] Calendar with onchange=this.form.submit: Time selection is not possible
avatar franz-wohlkoenig franz-wohlkoenig - change - 7 Apr 2017
Title
Calendar with onchange=this.form.submit: Time selection is not possible
[com_fields] Calendar with onchange=this.form.submit: Time selection is not possible
avatar dgt41 dgt41 - change - 8 Aug 2017
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2017-08-08 19:23:39
Closed_By dgt41
avatar joomla-cms-bot joomla-cms-bot - change - 8 Aug 2017
Closed_By dgt41 joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 8 Aug 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 8 Aug 2017

Set to "closed" on behalf of @dgt41 by The JTracker Application at issues.joomla.org/joomla-cms/14486

Add a Comment

Login with GitHub to post a comment