Please, I want to access startDate and endDate. How can I do that?
CodePudding user response:
days[1].props.startDate
to access start date
days[1].props.endDate
to access end date
CodePudding user response:
days
is an array of react elements with props date
,startDate
, ... as a instance of Moment
class. To display you need to format it. Example:
moment(days[1].props.startDate).format("DD/MM/YYYY")
CodePudding user response:
It is not working. I got an object. I need to get date.