Home > Article > Web Front-end > A brief discussion on jQuery.easyui's datebox formatting time_jquery
The method is very simple, I won’t go into too much nonsense here, just give you the code:
$.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); }
The above is the entire content of this article. I hope it will be helpful to my friends in learning jQuery.