html5 - How to convert datetime-local value to long value in jquery -


i using textbox getting date & time. want value @ jquery , convert value long value..

<input type="datetime-local" id="alarm_msg"  class="form-control textbox" />  

js

var message = $('#alarm_msg').val(); 

and shown 2014-04-15t12:59 .. here want remove t this..

try this

$(document).ready(function(){        var str='2014-04-15t12:59' // text box value here     alert(str.replace('t','')); }); 

demo


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -