2
Views
14
Comments
RichWidgets\Input_Calendar and an button to activate it, doesn't fire OnChange
Question
If I use a button to activate the calendar, it doesn't seem to fire the onchange of the input field ... anybody else has the same experience ?

To be sure what I do, create a button next to a dateInput field, add the richwidget, assign the input field AND assign the button to activate it.
The button activates the calendar, but after selecting a date it doesn't fire the onchange of the input field ....
2018-06-01 14-37-59
Rebecca Hall
After the 6.0 upgrade, the code in the Input_Calendar button was moved from the OnChange to the OnClick.  If you change the button code to "onclick()" instead then the problem will be resolved.
2011-06-15 10-51-22
Joop Stringer
Nope, that's not what I mean.
With v6 in the richwidget you can also have a button to trigger the calendar to open, not clicking in the input field. By personal request :-) ....
That all works like a charm. However if then a date is selected, the onChange of the input field is not triggered ...
2012-05-17 19-14-07
Felix Carrion
This is just what I need too. A button to trigger the calendar to open. The users I'm working with want to choose how they fill in a date with IE, whether they wanted to type the date themselfs or use the calendar input widget. 
2018-06-01 14-37-59
Rebecca Hall
I was able to duplicate this.  In the extended functions I set the onblur event to be "onchange()" and the event was triggered correctly after a date was selected from the calendar.   The "OnUpdate" needs to be set to the Input Id as well.
2012-03-16 12-21-09
João Rosado
Staff
Hi all,

Note: I didn't try anything out, didn't even try to replicate the problem.

But just as a warning before everyone starts setting javascript events to detect changes: Native browser events are NOT triggered when values are changed by javascript.
Also events like onblur usually have browser specific behaviors.


That said, if that is the current widget behavior is not triggering the On Change action built-in on the platform, I recommend creating a small sample eSpace and submitting it as an issue.

Regards,
João Rosado
2011-06-15 10-51-22
Joop Stringer
@Rebecca: to me this seems like a bug in the widget !

@Joao: then Outsystems needs to fix the component to work properly. Outsystems knows now :-)
But keep on looking in the mail. A sample OML is coming your way... by the way to me this is not tested properly before it has been sent out to the publie :-)
2018-06-01 14-37-59
Rebecca Hall
I agree with the bug issue ... I'm wondering if it is how the OnUpdate action is getting set.  I have included our example with the "bandaid" in place.
CloneOfCommonWidgets.oml
2011-06-15 10-51-22
Joop Stringer
Thanks rebecca,
I've just pointed support to this issue.

Hope they'll understand and fix it :-)
2011-06-15 10-51-22
Joop Stringer
News from support:

We’ve managed to reproduce the reported behavior.
In order to fix it in future revisions of the Platform, we’ve forwarded this information to our R&D.
In the meanwhile, the workaround suggested in the forums can be used to overcome this problem.
2011-06-15 10-51-22
Joop Stringer
@Outsystems: Any news on this item ??
2012-03-16 12-21-09
João Rosado
Staff
Hi Joop,

I did a fix for it after my last reply here.
It's already on the 6.0.1.19, so I guess It will be available on the next 7.0 revision also.

Regards,
João Rosado
2018-09-07 11-54-27
Eric Oud Ammerveld
João Rosado wrote:
Hi Joop,

I did a fix for it after my last reply here.
It's already on the 6.0.1.19, so I guess It will be available on the next 7.0 revision also.

Regards,
João Rosado
 
 João,

Are you able to upload an OML with that just widget?
I've been trying to get this thing working since 08:30 this morning and just saw this thread.

Regards,

Eric
2012-03-16 12-21-09
João Rosado
Staff
Hi,

Don't have a example eSpace at the moment with it, but it doesn't need anything special to work.

Just make sure you are using the RichWidgets from the SystemComponents distributed on 6.0.1.19+
(Note that at the time of this post there is no 7.0 release with that fix)


Regards,
João Rosado
2018-09-07 11-54-27
Eric Oud Ammerveld
Ok, extracted the richwidgets.
It's a small change.

Thanks!
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.