How to replace charecter "/" to "-" from string using jquery.
I want as below:
06/01/2013 to 06-01-2013
In My Case:
I am taking a value from input box
<input id="from-date" value="06/01/2013" name="from-date"/>
fdate = $("#from-date").val();
fdate.replace('/','-');
console.log(fdate);
but it return same string(06/01/2013)
.