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

WBOY
Release: 2016-05-16 15:52:48
Original
1465 people have browsed it

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);
  }
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template