Page 1 of 1

Calendar Elements do not set editable and readOnly

PostPosted: Thu Sep 27, 2018 2:36 pm
by gk1441607435
I have two problems with calendar elements

First, when I set the property editable to false, I can not change the textpart of the element, but I can still open the datechooser with the button right of the calendarelement.
This behaviour is in smart-client as in web-client. In NG-Client I don't know.
In my opinion the datechooser should be turned off, when the element is not editable.

Second I found out, that I can use the property readOnly on the calendar element. Set readOnly to true, will turn off the datechooser and dataimput is also blocked.
So far so good, but....

unfortunately I have an other problem here.

When I set the elements(let us call it 'dateCal') property readOnly to true

Code: Select all
forms.myform.elements.dateCal.readOnly = true;


and then I set it's property editable also to true, this will automaticly set readOnly to false

Code: Select all
forms.myform.elements.dateCal.editable = true;

=>forms.myform.elements.dateCal.readOnly
false


When I now set readOnly to true, this will have no effect, because readOnly will stay false

Code: Select all
forms.myform.elements.dateCal.readOnly = true;

=>forms.myform.elements.dateCal.readOnly
false


I saw this only in calendar elements.
Are this bugs or are this a features?

Anyway it makes some trouble in our solution. We use Servoy Version 8.1.4 on Windows 10