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

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -