Suppose your date is 2019-01-15
var date = "2019-01-15";
var d = new Date(date);
var month = d.getMonth()+1;
var day = d.getDate();
var output = (day<10 ? '0' : '') + day +'-'+ (month<10 ? '0' : '') + month + '-' +d.getFullYear();
Result
15-01-2019
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.