“disabled” property not working for date/time edit boxes displaying a date/time picker

StackOverflow https://stackoverflow.com/questions/11361533

  •  19-06-2021
  •  | 
  •  

質問

An editbox with its display type set to "Date/Time" and with the "Display date/time picker pop up" option checked obviously ignores an checked "Disabled" property (is this a bug?); without the picker pop up option the control can be disabled as any other editbox.

If however I check the control's "readonly" property along with its "Show disbled control for read only" property then the control appears to be rendered as "disabled"; the html source for the INPUT however shows these attributes

readonly="" aria-readonly="true"

Question: are there any possible side effects using that workaround? So far I don't have any experience with aria attributes and the like.

役に立ちましたか?

解決

This is indeed an existing issue, the disabled property doesn't work on the Date Time Picker. This should be fixed in 854 (usual provisos apply).

他のヒント

Setting all three attributes disabled, readonly, & showReadonlyAsDisabled, then the DateTime field shows up but is not functional.

[xp:inputText id="inputText2" **disabled="true"** **readonly="true"**
    **showReadonlyAsDisabled="true"**]
    [xp:dateTimeHelper id="dateTimeHelper1"][/xp:dateTimeHelper]
    [xp:this.converter]
        [xp:convertDateTime type="date"][/xp:convertDateTime]
    [/xp:this.converter]
[/xp:inputText]
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top