JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js"></script>
Type time here: <input type="text" id="StartTime"><br>
Click here: <button id="doTime">Click Me</button>

JavaScript

$(function() {

    $('#doTime').click(function() {
        var startTime = Date.parse($("#StartTime").val());
        alert(startTime);
    });

});