How to retrieve Date value from Database using C#.net and set in HTML5 input Type 'date'? -


i want retrieve date database , set html5 input type 'date'. have 2 html5 date fields ids 'coursestartdate' , 'courseenddate', , using following code couldn't getting value in html5 date.

   coursestartdate.value  = coursedr["start_date"].tostring();    courseenddate.value    = coursedr["end_date"].tostring(); 

you should try convert date time specific format accepted html5 control.

coursestartdate.text = datetime.utcnow.tostring("yyyy-mm-dd"); 

hope help.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -