I want to add the above array of timestamps inside a dropdown using React dropdown, I have done as follows:
let new_arr = [];
for (let i = start_ts; i < end_ts; i = i + interval) {
arr.push(i);
}
console.log('arr', arr);
for (var i = 0; i < arr.length; i += 2) {
new_arr.push(arr.slice(i, i + 2));
}
const defaultoption = new_arr[0];
return (
<View style={width > 414 ? styles.container_web : styles.container_mob}>
<View style={styles.inner_container}>
<TouchableOpacity>
<Image source={Images.back_icon} style={{height: 15, width: 15}} />
</TouchableOpacity>
<Dropdown options={new_arr} value={defaultoption} />
</View>
</View>
);
which resulted it to look as follows:

However I want the dropdown to look as follows:

Any idea or suggestion how should I do it? Any help would be great. Thank you


Dropdown? are you using a 3rd party library of a Dropdown component?${new Date(1602700200).toDateString()} - ${new Date(1627900200).toDateString()}Result: "Mon Jan 19 1970 - Tue Jan 20 1970"