<%@ Page Title="" Language="C#" MasterPageFile="~/Book/Book.master" AutoEventWireup="true" CodeBehind="calendar_my.aspx.cs" Inherits="Book.Book.calendar_my" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cont_form" runat="server">

     
    <style>
        .arrow{ font-size:12px; color:#428bca; cursor:pointer;}
    </style>

    
    <link href="js_cal/css/reset.css" rel="stylesheet" />

    <link href="js_cal/css/simple-calendar.css" rel="stylesheet" />

    <link href="js_cal/css/calendar.css" rel="stylesheet" />


    <script src="js_cal/js/nongli.js"></script>

     <script src="js_cal/js/host.js"></script>
    <script>

        var jsonData = [];
    </script>



      <div class="inner">
        <div id='calendar' class="sc-calendar">
            <div class="sc-header">


                <div class="sc-title" style="text-align:left; border-bottom:solid 1px #ccc"  >

                    <span class="year"><span class="sc-select-year"></span>年</span>  
                    <span class="sc-select-month"  ></span>

                    <span class="cal-title"> </span>

                    <span class="month">
                        <span class="arrow sc-mleft">上月</span>
                        <span class="arrow sc-mright">下月</span>
                    </span>
                </div>


                <div class="sc-week"></div>
            </div>


            <div class="sc-body">
                <div class="sc-days"></div>
            </div>


        </div>





    </div>

                
    <script src="js_cal/js/simple-calendar.js"></script>
    <script src="js_cal/js/hammer-2.0.8-min.js"></script>
  
   
 

  


    <script type="text/javascript">
        var myCalendar = new SimpleCalendar('#calendar');

        $(function () {

            $(".sc-mleft").click(function () {
                myCalendar.subMonth();
                updateEvent();
            })

            $(".sc-mright").click(function () {
                myCalendar.addMonth();
                updateEvent();
            })
        });


        //滑动切换
        var myElement = document.getElementById('calendar');
        var hammer = new Hammer(myElement);

        hammer.on("swipeleft", function (ev) {
            myCalendar.addMonth();
            updateEvent();
        });

        hammer.on("swiperight", function (ev) {
            myCalendar.subMonth();
            updateEvent();
        });



        function updateEvent() {
            var _year = $(".sc-select-year").html();
            var _month = $(".sc-select-month").html().replace("月", "");
            myCalendar.updateRemark(_year, _month);
        }





        updateEvent();






    </script>













    <script>















        function shouwData(year, month, day) {

            $("#results").val('');

            _r = year + "-" + month + "-" + day;

            var r = "";
            var c = _r.length;
            for (var i = 0; i < c; i++) {
                var _id = _r[i].id;
                var _name = _r[i].name;
                var _dttime = _r[i].dttime;

                r += _id + _name + _dttime + "<br>";

            }
            $("#results").html(r);


        }




        function Remark(id, name, inttime) {
            remark = new Object();
            remark.id = id;
            remark.name = name;

            var t = new Date();
            t.setTime(inttime);
            remark.dttime = t.toLocaleDateString();

            return remark;
        }




































    </script>










</asp:Content>
