Welcome Guest Search | Active Topics | Sign In | Register

eo:DatePicker Options
PRO POTSDAM GmbH
Posted: Tuesday, May 25, 2021 10:34:59 AM
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 ?!

eo_support
Posted: Tuesday, May 25, 2021 10:46:39 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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.aspx

Thanks!
PRO POTSDAM GmbH
Posted: Tuesday, June 8, 2021 8:50:31 AM
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"
eo_support
Posted: Tuesday, June 8, 2021 10:02:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
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!
PRO POTSDAM GmbH
Posted: Wednesday, June 9, 2021 3:03:38 AM
Rank: Advanced Member
Groups: Member

Joined: 6/17/2010
Posts: 35
Cool, it worked now.

I could have come up with that myself. Angel

Thanks!
PRO POTSDAM GmbH
Posted: Wednesday, June 9, 2021 5:19:35 AM
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").
eo_support
Posted: Wednesday, June 9, 2021 2:51:04 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

You would use setDisabled(true), not setDisabled("true"), to disable the DatePicker, and setDisabled(false) to enable it.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.