第一种方法:
<link href="<%=Url.Content("~/Content/<your style here> /jquery-ui-1.8.4.custom.css")%>" rel="stylesheet" type="text/ css" /> <script type="text/javascript" src="<%=Url.Content("~/Scripts/ jquery-1.4.1.min.js")%>"></script> <script type="text/javascript" src="<%=Url.Content("~/Scripts/ jquery-ui-1.8.4.custom.min.js")%>"> <%= Html.TextBox("TestDatePicker" , Model.TestDatePicker.ToString("d"), new { @class ="myDatePickerClass" })%> http://hi.baidu.com/itbase/item/ccf81f17562688fc756a8423
第二种方法:
http://www.entlib.net/?p=234
这种方法相当的详细。
貌似在这种方法不适用于.cshtml试图页面吧!
@ii 乄筱跃____:
@{ ViewBag.Title = "Calendar"; } <script src="../../Content/fullcalendar.min.js" type="text/javascript"></script> @section Styles{ <link href="../../Content/fullcalendar.css" rel="stylesheet" type="text/css" /> } <script type="text/javascript"> function RefreshCalendar() { $("#FullCalendar").fullCalendar('refetchEvents'); } $(document).ready(function () { $("#FullCalendar").fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, events: function (start, end, callback) { var data = { PeriodBegin: start, PeriodEnd: end }; $.ajax({ url: '@Url.Action("GetAppointmentsByPeriodForPatientForCalendar", "Patient")', data: JSON.stringify(data), type: 'POST', contentType: 'application/json', success: function (results) { callback(results) } }); }, eventClick: function (calEvent) { //EditAppointment(calEvent.id); ViewAppointment(calEvent.id); } }); $("#EditAppointmentDialog #OK").click(RefreshCalendar); }); </script> <h2>Calendar</h2> <a onclick='ShowAddCalendarEventDlg("09/20/2011", "10:15");'>Add calendar event</a> <div id="FullCalendar"></div> @Html.Partial("_AddCalendarEvent") @Html.Partial("_EditAppointment")
用 jquery 日曆 控件。
ww