username@email.com
2023-02-28 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//日期
; RoadUI.Calendar = function ()
{
    var instance = this;
    this.init = function ($cts)
    {
        $.each($cts, function ()
        {
            var istime = $(this).attr("istime");
            var minDate = $(this).attr("mindate");
            var maxDate = $(this).attr("maxdate"); 
            var daybefor = $(this).attr("daybefor");
            var dayafter = $(this).attr("dayafter");
            var currentmonth = $(this).attr("currentmonth");
            var format = $(this).attr("format");
            if (!format || format.length == 0)
            {
                format = "yyyy-MM-dd";
                if (istime != null && (istime.toLowerCase() == "true" || istime == "1"))
                {
                    format = "yyyy-MM-dd HH:mm";
                }
            }
            var opts = { dateFmt: format };
            if (minDate)
            {
                opts.minDate = minDate;
            }
            if (maxDate)
            {
                opts.maxDate = maxDate;
            }
            if (daybefor != null && (daybefor.toLowerCase() == "true" || daybefor == "1"))
            {
                opts.maxDate = '%y-%M-%d';
            }
            if (dayafter != null && (dayafter.toLowerCase() == "true" || dayafter == "1"))
            {
                opts.minDate = '%y-%M-{%d}';
            }
            if (currentmonth != null && (currentmonth.toLowerCase() == "true" || currentmonth == "1"))
            {
                opts.minDate = '%y-%M-01';
                opts.maxDate = '%y-%M-%ld';
            }
            $(this).removeClass().addClass("mytext").bind("click", function ()
            {
                WdatePicker(opts);
            });
        });
    };
 
}