JSFiddle - React, Tailwind, and code Playground

HTML

<input type="date" id="test" />

JavaScript

if ( $('#test')[0].type != 'date' ) $('#test').datepicker();