asp の fullcalendar のこのコードは正常に動作します。 http://code.google.com/p/fullcalendar-asp-net/
開始日と終了日を手動で入力または変更する方法は? (日時ピッカーも使用)
変更を試みます:
$('#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>
どうもありがとうございます