English 中文(简体)
全部日历结束添加起始日期和结束日期手动
原标题:Fullcalendar add startdate and endate manualy

This code of fullcalendar for asp works fine. http://code.google.com/p/fullcalendar-asp-net/

How to enter or modify manually the startdate 和 enddate ? (also with a datetime picker)
I try change :

$( #addDialog ).dialog({

    autoOpen: false,
    width: 470,
    buttons: {
        "Add": function () {

            //alert("sent:" + addStartDate.format("dd-MM-yyyy hh:mm:ss tt") + "==" + addStartDate.toLocaleString());
            var eventToAdd = {
                title: $("#addEventName").val(),
                description: $("#addEventDesc").val(),
                start: addStartDate.format("dd-MM-yyyy hh:mm:ss tt"),
                end: addEndDate.format("dd-MM-yyyy hh:mm:ss tt")

            时 时;



$( #addDialog ).dialog({

    autoOpen: false,
    width: 470,
    buttons: {
        "Add": function () {

            //alert("sent:" + addStartDate.format("dd-MM-yyyy hh:mm:ss tt") + "==" + addStartDate.toLocaleString());
            var eventToAdd = {
                title: $("#addEventName").val(),
                description: $("#addEventDesc").val(),
                start: $("#addEventStartDate").val(),
                end: $("#addEventEndDate").val(),
            时 时;

function selectDate(start, end, allDay) {

$( #addDialog ).dialog( open );

//$("#addEventStartDate").text("" + start.toLocaleString());
//$("#addEventEndDate").text("" + end.toLocaleString());

$("#addEventStartDate").val(start.format("dd/MM/yyyy hh:mm:ss tt"));
$("#addEventEndDate").val(end.format("dd/MM/yyyy hh:mm:ss tt"));

//addStartDate = start;
//addEndDate = end;
//globalAllDay = allDay;

//alert(allDay);

时 时

<div id="addDialog" style="font: 70%  Trebuchet MS , sans-serif; margin: 50px;" title="Add Event">
<table cellpadding="0" class="style1">
        <tr>
            <td class="alignRight">
                name:</td>
            <td class="alignLeft">
                <input id="addEventName" type="text" size="50" /><br /></td>
        </tr>
        <tr>
            <td class="alignRight">
                description:</td>
            <td class="alignLeft">
                <textarea id="addEventDesc" cols="30" rows="3" ></textarea></td>
        </tr>
        <tr>
            <td class="alignRight">
                start:</td>
            <td class="alignLeft">
                <input id="addEventStartDate" onchange="start" type="text" size="50" /><br /></td>
        </tr>
        <tr>
            <td class="alignRight">
                end:</td>
            <td class="alignLeft">
                <input id="addEventEndDate" type="text" size="50" /><br /></td>
        </tr>
    </table>

</div>

非常感谢你

问题回答

您是否尝试将您的对话框绑定为全天目录的 dayClick 回调? 另外, 您还可以在对话框中使用任何日期的 Picker( 如 < a href=" http://jqueryui. com/ demos/ dateparter/ " rel=" nofollow" >jQuery 界面 DatePicker ) 。

您可以使用事件点击回调来编辑日历上已经创建的事件 。

希望这有帮助!





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签