JSFiddle - React, Tailwind, and code Playground
HTML
<input id='text' type='text' value="test"/>
<input id='datetime' type='datetime-local' />
<script>
var datetimeval = $("#datetime").val();
var textval = $("#text").val();
alert(textval);
alert(datetimeval);
</script>