代码之家  ›  专栏  ›  技术社区  ›  Abdul Sadik Yalcin

React native-TextInput十进制键盘,在iOS上显示逗号而不是点

  •  0
  • Abdul Sadik Yalcin  · 技术社区  · 6 年前

    一些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 回复  |  直到 6 年前
    推荐文章