我正在尝试从我的数据库转换格式为YYYYMMDD的字符串,并将其放在输入框中id="startingdate".如何在另一个输入框中将其转换为YYYY-MM-DD id="startingdate1"?
<input type="" id="startingdate1" name="startingdate1" size="20" class="form-control col-md-7 col-xs-12" placeholder="YYYY-MM-DD"/>
<input id="startingdate" name="startingdate" type="hidden"/>
Run Code Online (Sandbox Code Playgroud)