O'Reilly logo

React Native By Example by Richard Kho

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

DatePickerIOS plus ExpandableCell

In the next step, you should modify the AddExpensesModal component to contain the following things:

  • A DatePickerIOS component that sets only the date--without time--the expense was made on. It should default to today's date if not specified:
    • You should import and wrap DatePickerIOS around the ExpandableCell component we built for Tasks.
  • A line of text that explains the date on which the expense was made.

This is how I added ExpandableCell to AddExpensesModal:

// Expenses/app/components/AddExpensesModal/index.js ... import {   DatePickerIOS,   ... } from 'react-native';  import moment from 'moment'; import ExpandableCell from '../ExpandableCell'; ... export default class AddExpensesModal extends Component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required