|
Rank: Advanced Member Groups: Member
Joined: 6/17/2010 Posts: 35
|
The DatePicker-Object behaves differently between Edge/IE and Chrome.
EO: Build_2021_1_11_0 Edge: V. 90.0.818.66 Chrome: V. 90.0.4430.212 IE: V. 1809 (Build 17763.1935)
I inspect the DatePicker on the Page via Chrome-DevTools.
The DatePicker has the id "_eo_P1_picker" (date-box) and "_eo_P1_popupimg" (calendar-button).
I disabled at pageLoad the DatePicker via javascript:
function _tagAscx(_control) { return document.getElementById(_control); }
picker21=_tagAscx('_eo_P2_picker'); picker22=_tagAscx('_eo_P2_popupimg'); picker21.disabled=true; picker22.disabled=true;
Edge/IE: picker21.disabled=true; <- it works picker22.disabled=true; <- it works
Chrome: picker21.disabled=true; <- it works picker22.disabled=true; <- failed ?!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, You should not enable/disable the control this way. You should use this method instead: https://www.essentialobjects.com/doc/jsdoc.public.web.calendar.setdisabled.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/17/2010 Posts: 35
|
Hi,
when I assign the property "setDisabled" to the object, ...
picker22.setDisabled("true");
... I get the following error message:
TypeError: The object does not support the property or method "setDisabled"
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
You need to call eo_GetObject(your_object_id) to get the client side DatePicker object. This is not the same as your DOM object.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/17/2010 Posts: 35
|
Cool, it worked now. I could have come up with that myself. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/17/2010 Posts: 35
|
however, I have just stated, that at pageload the object can be disabled via eo_GetObject("Picker1").setDisabled("false"), but not enabled again afterwards via eo_GetObject("Picker1").setDisabled("true").
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
You would use setDisabled(true), not setDisabled("true"), to disable the DatePicker, and setDisabled(false) to enable it.
Thanks!
|
|