JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://jquery-joshbush.googlecode.com/files/jquery.maskedinput-1.2.2.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css">
<input class="datepicker" type="text" />

JavaScript

date_obj = new Date();
date_obj_hours = date_obj.getHours();
date_obj_mins = date_obj.getMinutes();

if (date_obj_mins < 10) { date_obj_mins = "0" + date_obj_mins; }

if (date_obj_hours < 10) {date_obj_hours = "0" + date_obj_hours;}

date_obj_time = "'"+date_obj_hours+":"+date_obj_mins+"'";

$( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd ' + date_obj_time });
$(".datepicker").mask("9999-99-99 99:99");