React native 本地社区datetimepicker没有给我一个邮戳
我正在使用react native community/datetimepicker,但它并没有给我一个日期戳,只是给了我一个时间戳。我已将模式更改为date,但它仍然给我一个时间戳。下面是我的代码:React native 本地社区datetimepicker没有给我一个邮戳,react-native,React Native,我正在使用react native community/datetimepicker,但它并没有给我一个日期戳,只是给了我一个时间戳。我已将模式更改为date,但它仍然给我一个时间戳。下面是我的代码: {this.state.show && ( <DateTimePicker testID="dateTimePicker" timeZoneOffsetInMinutes={0} value={new D
{this.state.show && (
<DateTimePicker
testID="dateTimePicker"
timeZoneOffsetInMinutes={0}
value={new Date()}
mode={'date'}
is24Hour={false}
display="calendar"
onChange={value => {
Person.setProperty('birthDate', value);
}}
/>
)}
{this.state.show&&(
{
Person.setProperty('生日',值);
}}
/>
)}
查看
setDate = (event, date) => {};
<RNDateTimePicker onChange={this.setDate} />;
onChange={(event, date) => {
Person.setProperty('birthDate', date);
}}