React-native-iOS上的TextInput小数点显示逗号而不是点

时间:2020-08-14 22:33:03

标签: react-native react-native-textinput

某些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);
    }}
/>

问题:

enter image description here

所需的输出:

enter image description here

0 个答案:

没有答案