Calendar Elements do not set editable and readOnly

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Calendar Elements do not set editable and readOnly

Postby gk1441607435 » Thu Sep 27, 2018 2:36 pm

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
gk1441607435
 
Posts: 14
Joined: Mon Sep 07, 2015 8:30 am

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests