javascript - Chrome: How to set a dynamically created <input date> date picker based on a string "dd/mm/yyyy"? -


some <td> tag contains string date dd/mm/yyyy 24/5/2012
need read string date , use dynamically set value of dynamically created input date tag.

var stringdate = selectedel.text(); anotherel.html("<input type='date' value='" + stringdate + "'/>"); 

the code above has no effect. chrome browser renders empty default date picker field contains: dd ----- yyy

input type date takes format yyyy-mm-dd displays date localised browser (chrome). should able supply date in format yyyy-mm-dd , display correctly depending on localisation settings. checkout codepen

<input type="date" value="2008-09-05" /> 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -