代码之家  ›  专栏  ›  技术社区  ›  Kokkie

使用下拉列表时由浏览器翻译的小数

  •  6
  • Kokkie  · 技术社区  · 6 年前

    如果选择0.25,则浏览器将删除该点,并导致值为25(因此出现以下错误)。

    dot gets removed by the browser

    带有listitems的示例配置会导致TFS中的下拉列表。这在Firefox中运行良好。Chrome和Internet Explorer删除圆点,例如,将值0.5转换为5

    <FIELD name="Effort" refname="Microsoft.VSTS.Scheduling.Effort" type="Double" reportable="measure" formula="sum">
        <HELPTEXT>The estimated effort to implemented the backlog item</HELPTEXT>
        <ALLOWEDVALUES expanditems="true">
            <LISTITEM value="0" />
            <LISTITEM value="0.25" />
            <LISTITEM value="0.5" />
            <LISTITEM value="1" />
            <LISTITEM value="2" />
            <LISTITEM value="3" />
            <LISTITEM value="5" />
        </ALLOWEDVALUES>
    </FIELD>
    

    对于internetexplorer来说,可以通过将英语作为首选语言来解决这个问题,但这并不是一个解决方案,因为我们的大多数用户都设置了荷兰语。将点设置为十进制分隔符也不是一个解决方案,因为Dutch使用逗号。

    enter image description here

    我怎样才能在不打扰最终用户的情况下解决这个问题?

    2 回复  |  直到 6 年前
        1
  •  0
  •   this_is_om_vm    6 年前

    您需要定义一个控制域。请按照本教程操作,它肯定会对您有所帮助。 单击此处 Control field numberFormat

    或者你也可以试试我的样品

    <Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.Effort"  Label="Rough Estimation:" LabelPosition="Left" NumberFormat="DecimalNumbers" />
    

        2
  •  0
  •   Kokkie    6 年前

    微软的人发现了这个问题,他们正在解决它;
    “仅供参考,我们发现这是本地化的问题。我们正在修复它”