Home >Web Front-end >JS Tutorial >A brief discussion on jQuery.easyui's datebox formatting time_jquery

A brief discussion on jQuery.easyui's datebox formatting time_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 15:52:481482browse

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 &#63; ('0' + m) : m) + '/' + (d < 10 &#63; ('0' + d) : d);
  }

The above is the entire content of this article. I hope it will be helpful to my friends in learning jQuery.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn