CaioQuirinoMedeiros/react-native-mask-input

Mask dd/MM/yyyy

ErionTp opened this issue · 4 comments

I have a mask input like this:

<MaskInput
    style={{ fontSize: 15 }}
    maskAutoComplete
    value={date}
    onChangeText={(masked, unmasked) => {
        setMaskedDate(masked)
    }}
    mask={Masks.DATE_MMDDYYYY}
    keyboardType={'numeric'} />

How can i format the mask as dd/MM/yyyy instead of __ /__ /____,

I didn't understand your question

The placeholder of the MaskInput by default is '__ / __ / ____'. How to make this placeholder show 'dd/MM/yyyy'

@ErionTp you should use the placeholder prop

@ErionTp just simple set the placeholder props to whatever you want.
ie

<MaskInput
 ...otherProps
  mask={Masks.DATE_MMDDYYYY}
  placeholder="dd/MM/yyyy"
/>