Mask dd/MM/yyyy
ErionTp opened this issue · 4 comments
ErionTp commented
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 __ /__ /____,
CaioQuirinoMedeiros commented
I didn't understand your question
ErionTp commented
The placeholder of the MaskInput
by default is '__ / __ / ____'. How to make this placeholder show 'dd/MM/yyyy'
CaioQuirinoMedeiros commented
@ErionTp you should use the placeholder
prop
anhtuank7c commented
@ErionTp just simple set the placeholder props to whatever you want.
ie
<MaskInput
...otherProps
mask={Masks.DATE_MMDDYYYY}
placeholder="dd/MM/yyyy"
/>