A key feature in Tasks is the ability to set a reminder for when a task is due. Ideally, our users can set a day as well as a time for when a task should be completed so that they can be reminded of the due date. To accomplish this, we'll use an iOS component named DatePickerIOS. This is a component that renders a date and time selector that we can utilize in our application.
Listed here are the two props that we will be using with our DatePickerIOS component. Other props exist in the React Native documentation in case you are interested:
- date: This is one of the two required props that track the current selected date. Ideally, this information is stored within the state of the component that renders DatePickerIOS. The date should be an instance of the Date object in JavaScript.
- onDateChange: This is the other required prop and is fired when a user changes the date or time...