V9 Disabling the calendar on a datetime field
I'm using
$find("datetimefield").editor.disable();
to disable datetime fields but the calendar does not become disabled. The user can still click on the calendar but the date they select does not populate the field. The problem is it usually throws an error or the calendar never closes. I know in 7.6 you had to get the DIV tag then go through the child nodes of the DIV and set it to disabled. This doesn't seem to work in 9. Does anyone know how to disable the calendar as well as the field?
Thanks
Comments
-
I'm afraid it does not help, but this does clearly show why such hacks will cause more pain than gain IMO.
0 -
It seems that something simple such as:
z=document.getElementById("DropDownList");
z.style.backgroundColor="#E8E8D8"
z..disabled=true;
running client side does not work either. The background changes but it is still selectable.
Is there anyway to dynamically disable fields in v9?
0 -
Ok, figured out a couple.
to turn off a text box i used the following :
$find("textboxID").editor.disable();
for a radio group i was able to do this
rdoArray = new Array();
rdoArray[0] = "rdoGroup_Editor_Option 1"
rdoArray[1] = "rdoGroup_Editor_Option 2"
rdoArray[2] = "rdoGroup_Editor_Option 3"
Where rdoGroup is the ID of the control and Option 1, 2, 3 are the values. "Editor" is added to the id to create the complete control id
then you can loop through and say
for (i=0;i<rdoArray.length;i++)
{
x=document.getElementById(rdoArray[i]);
x.disabled=true;
}
0 -
To disable a date control i did the following:
//* disable the textbox portion
$find("DateControl_ID").editor.disable();
//* disable the button
//* _Editor_popupButton needs to be added. Metastorm creates an anchor tag with this id
varD=document.getElementById("DateControl_ID_Editor_popupButton");
D.disabled= true;
Probably a better way to do this, but this is what I got to work
0 -
I know that this is not the main topic kf discusion, but I think calendar icon should not be displayed if field is read only at all. What do you think about this "feature"?
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories