Discussion on jQuery.easyui datebox formatting time
- 2020-06-19 09:50:09
- OfStack
The method is simple. Without further ado, the code is presented as follows:
$.fn.datebox.defaults.formatter = function (date) {
var y = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();
return y + '/' + (m < 10 ? ('0' + m) : m) + '/' + (d < 10 ? ('0' + d) : d);
}
Above is the content of this article, I hope it can be helpful for you to learn jQuery.