package seedu.whatnow.ui;

import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import seedu.whatnow.model.task.ReadOnlyTask;

public class TaskCard extends UiPart{

    private static final String FXML = "TaskListCard.fxml";
    private static final String INCOMPLETE = "";

    @FXML
    private HBox cardPane;
    @FXML
    private Label name;
    @FXML
    private Label taskDate;
    @FXML
    private Label id;
    @FXML
    private Label tags;
    @FXML
    private Label status;

    private ReadOnlyTask task;
    private int displayedIndex;

    public TaskCard(){

    }

    public static TaskCard load(ReadOnlyTask task, int displayedIndex){
        TaskCard card = new TaskCard();
        card.task = task;
        card.displayedIndex = displayedIndex;
        return UiPartLoader.loadUiPart(card);
    }

    @FXML
    public void initialize() {
        name.setText(task.getName().fullName);
        id.setText(displayedIndex + ". ");
        taskDate.setText(task.getTaskDate().fullDate);
        tags.setText(task.tagsString());
        if (task.getStatus().equals("incomplete")) {
            status.setText(INCOMPLETE);
        } else {
            status.setText(task.getStatus());
        }
    }

    public HBox getLayout() {
        return cardPane;
    }

    @Override
    public void setNode(Node node) {
        cardPane = (HBox)node;
    }

    @Override
    public String getFxmlPath() {
        return FXML;
    }
}

@@ -1018,16 +1018,57 @@
         
+if(task.getTaskDate() != null)%7B%0A        %09
 taskDate
@@ -1102,24 +1102,34 @@
 .fullDate);%0A
+        %7D%0A
         tags

Update TaskCard.java file - Check whether there is a date entered