Ok, trying to render date from one component into a second component, but using conditional rendering so if date on component 1 is null, component 2 date field will not render. New to react. using following logic.
const enpDate = (earlyNotificationDate);
if (enpDate) {
moment(earlyNotificationDate, 'MM/DD/YYYY')
}
Mentor does not like it and would rather wrap in function. Cannot get function to render properly.