JSFiddle - React, Tailwind, and code Playground
HTML
<input id="testInput" type="datetime-local" value="1985-04-12T23:20:50.52"/>
JavaScript
var lastValue = $('input#testInput').val();
$('input#testInput').on('change', function(event)
{
var newValue = $('input#testInput').val();
if(!newValue || newValue === "")
{
$('input#testInput').val(lastValue);
}
else
lastValue = newValue;
});