browser - Decimals translated by browser when a dropdown is used
问题描述
The dot is removed by the browser and results in a value of 25 if you choose 0.25 (hence the error below).
The example config with listitems results in a dropdown in TFS. This works fine in Firefox. Chrome and Internet Explorer remove the dot and e.g. transform the value 0.5 to 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>
It can be solved for Internet Explorer by putting English as language preference, but that is not a solution since most of our users have set Dutch. Setting the dot as a decimal separator isn't a solution either, because Dutch uses a comma for that.
How can I solve this without bothering the end user?
解决方案
您需要定义一个控制字段。请按照本教程进行操作,它一定会对您有所帮助。单击此处控制字段编号格式
或者你也可以试试我的样品
<Control Type="FieldControl" FieldName="Microsoft.VSTS.Scheduling.Effort" Label="Rough Estimation:" LabelPosition="Left" NumberFormat="DecimalNumbers" />
随意询问它是否不起作用。谢谢
推荐阅读
- javascript - 为什么 mouseenter 不是每次都执行?
- google-sheets - 从谷歌表格创建报告
- javascript - 创建一个包含所有值小于 150 的产品的数组
- discord.py - 使用不和谐机器人存储消息
- c++ - 使用 g++ 编译时出现不完整类型错误
- python - Pandas to_numeric 将我的系列转换为 NaN
- c# - ProtectedMemory - 如何保证字节数组的大小是16的倍数?
- java - 用 Java 中的 Vaadin 视图替换 php 文件
- c# - 在 VS10 .NET 表单中寻找更动态的设计器 TypeConverter 序列化
- html - Angular:在 IE11 中为用户更改字体大小选项(CSS 变量)