JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<button id="btnExcelRead">Test</button>
<input type="text" id="txtStartDate" />

JavaScript

$(function(){
      $("#btnExcelRead").click(CheckValidation);
});

function CheckValidation () {
    if ($("#excelUpload").val() === "") {
        alert("Select file");
        return false;
    }
    if ($("#txtStartDate").val() === "") {
        alert("Check the start date!");
        return false;
    }
    if ($("#txtEndDate").val() === "") {
        alert("Check the end date!");
        return false;
    }
}