1
我使用tcomb
在react-native
建立一个形式,我的表单字段是birthDate: t.maybe(t.Date)
,但它似乎没有风格使用tcomb形式的本机反应本土
const formRegistration = t.struct({
// other fields
birthDate: t.maybe(t.Date)
});
我有还增加了config
下来options
:
const options = {
fields : {
birthDate: {
label: 'Birth Date',
mode: 'date',
config: {
format: (date) => myFormatFunction('DD MM YYYY', date),
dialogMode: 'spinner'
}
}
}
}
};