某些iOS设备似乎在小数点上显示了,
(逗号)而不是.
。我相信这与键盘语言/语言环境有关。是否有一种方法可以强制decimal-pad
显示.
而不管键盘语言/区域设置如何?
<TextInput
rejectResponderTermination={false}
style={[
{
fontSize: entryValueFontSize,
height: height,
},
calculatorStyles.inputsShared,
calculatorStyles.amountInput,
theme.inputsShared,
]}
autoCapitalize={'none'}
placeholder={entryValueLabel}
placeholderTextColor={theme.placeholderTextColor}
keyboardType={'decimal-pad'}
returnKeyType={'done'}
defaultValue={''}
value={isNaN(this.state.entryValue) ? '' : this.state.entryValue}
onChangeText={(entryValue) => {
this.onEntryValueChange(entryValue);
}}
/>
问题:
所需的输出: