Input_Calendar forces readonly attribute in the bound Input widget

Input_Calendar forces readonly attribute in the bound Input widget



the context: a pair of Input + Input_Calendar widgets.

When i click Input and Input_Calendar appears, Input gets readonly="readonly" attribute that makes it ineditable. It remains in this state even when Input_Calendar gets closed.

It happens when I use Chrome or FF. In IE it works well.

The piece of JS that causes this behavior is (together with the original comments):

 } else if (!this.isAndroidDefaultBrowser && !!('ontouchstart' in window) && typeof $ !== "undefined") {
    //This case is for when we are on a touch enabled device that does not support datepickers which means we will use our datepicker
    //But, since the input is still of type text, when the user clicks on it, it will open the on-screen keyboard.
    //To prevent that, we set the input as read-only
    //However we only do this inside the handler because if we set it now as read only and it is inside a Form, its javascript will disable the datepicker
    var input = $('#' + params["inputField"]);
    input.on('focus', function() {
        input.attr('readonly', 'true');

The purpose of this "readonly" is clear but the condition is not good enough. And, after all, "readonly" should be removed when not neccessary.

Has anybody a solution of this issue (other than commenting out this key statement)?



Hi Tomasz,

You created a thorough desciption of the problem. Thank you for that.

There is another post that comes up with a work-around, but there is still no final solution as far as I know.

I'll address this directly with R&D to give it a higher priority.

Kind regards,

Remco Dekkinga

Any news on this topic ? We are exactly facing this problem on a Lenovo Carbon X1 and other user that is using a touch enable laptop on a new project that is already in beta testing. Affected agents are reporting they can't write on the calendar widget if they have a touch enabled laptop. Do outsystems have a estimate for this fix, or anyone has been able to override the onfocus js event ?


Any news on this? I've also just witnessed this behaviour on two different Lenovo laptops (could be the same model) I'm told have no touch screen.