想要在日历中创建事件…使用Fullcalendar.min.js…如何在提示框中创建表单 $('V2_calenderEvents').live('click',function()){ 变量日期=新日期(); var d=date.getDate(); var m=date.getMonth(); var y=date.getFullYear(); $(“#主要内容”).empty(); $(“#主要内容”)。追加( ""+ “”+ "" + ""+ "" ); var calendar=$(“#calendar”).fullCalendar({ 标题:{ 左:“上一个,下一个今天”, 中心:'标题', 右图:“月,agendaWeek,agendaDay” }, 是的, selectHelper:对, 选择:功能(开始、结束、全天){ var abc={ 州0:{ 标题:“
新事件”, html: ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “通知类型”+ “iCal电子邮件”+ “简单电子邮件”+ “不发送通知”+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “分享”+ “个人的”+ “当然”+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “选择”+ ''+ ''+ '', 按钮:{保存:1}, //焦点:“输入[name='fname']”, 提交:职能(e、v、m、f){ title=f.eventtitle; e、 预防默认值(); 新标题=标题; 如果(newtitle.length==0) { bootbox.alert(“必须填写标题”); $.prompt.show(); } $.prompt.close(); 如果(新标题){ 日历。完整日历('renderEvent', { 标题:newtitle, 开始日期:eventdate, 完:完,, 全天 }, true//使事件“持续” ); } /*如果(新标题){ var rootURL=“services/CalendarService/updateCalendarEvent/”+espanUserId+“/”+espanUserRole+“/”+title+“/”+eventdate; $.get(rootURL,函数(数据){ }); }*/ 日历。完整日历(“取消选择”); } }, }; //var title=提示(“添加事件”); 变量标题=提示(abc); 如果(标题){ 日历。完整日历('renderEvent', { 标题:标题,, 开始:开始, 完:完,, 全天 }, true//使事件“持续” ); } 日历。完整日历(“取消选择”); }, 是的, 活动:[ { 标题:“全天活动”, 开始:新日期(y、m、1) }, { 标题:“长期活动”, 开始日期:新日期(y、m、d-5), 结束:新日期(y、m、d-2) }, { 身份证号码:999, 标题:“重复事件”, 开始日期:新日期(y、m、d-3、16、0), 全天:错 }, { 身份证号码:999, 标题:“重复事件”, 开始日期:新日期(y、m、d+4、16、0), 全天:错 }, { 标题:"会议",, 开始日期:新日期(y、m、d、10、30), 全天:错 }, { 标题:"午餐",, 开始日期:新日期(y、m、d、12、0), 结束:新日期(y、m、d、14、0), 全天:错 }, { 标题:"生日派对",, 开始:新日期(y、m、d+1、19、0), 结束:新日期(y、m、d+1、22、30), 全天:错 }, { 标题:“点击谷歌”, 开始日期:新日期(y、m、28), 结束:新日期(y、m、29), 网址:'http://google.com/' } ] }); });想要在日历中创建事件…使用Fullcalendar.min.js…如何在提示框中创建表单 $('V2_calenderEvents').live('click',function()){ 变量日期=新日期(); var d=date.getDate(); var m=date.getMonth(); var y=date.getFullYear(); $(“#主要内容”).empty(); $(“#主要内容”)。追加( ""+ “”+ "" + ""+ "" ); var calendar=$(“#calendar”).fullCalendar({ 标题:{ 左:“上一个,下一个今天”, 中心:'标题', 右图:“月,agendaWeek,agendaDay” }, 是的, selectHelper:对, 选择:功能(开始、结束、全天){ var abc={ 州0:{ 标题:“,fullcalendar,Fullcalendar,新事件”, html: ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “通知类型”+ “iCal电子邮件”+ “简单电子邮件”+ “不发送通知”+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “分享”+ “个人的”+ “当然”+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ “选择”+ ''+ ''+ '', 按钮:{保存:1}, //焦点:“输入[name='fname']”, 提交:职能(e、v、
//当我们点击日历上的特定日期时,会打开一个提示框,我想在这个提示框中创建一个表单,我已经在变量中为表单编写了代码,当我在提示框中传递这个变量时,它返回我object object…如何解决这个问题…我正在使用fullcalendar.min.js你想在这里实现什么可以通过
renderEvent
检查这里的文档来实现,只需创建一个函数并将参数传递给它start
和end
。谢谢,但我不需要这个,我必须在提示框中创建一个表单,我该怎么做。。。
$('#V2_calenderEvents').live('click',function(){
var date = new Date();
var d = date.getDate();
var m = date.getMonth();
var y = date.getFullYear();
$('#main-content').empty();
$('#main-content').append(
"<div class='calendar' style='height:555px;width:100%;margin-top:0px;'>"+
"</br>"+
"<div class='calendar' id='calendar'>" +
"</div>"+
"</div>"
);
var calendar = $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
var abc = {
state0: {
title: '<p><i class="fontello-icon-edit"></i> New Event</p>',
html:
'<div class="control-group"><div class="controls"><input style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" id="eventtitle" class="input-block-level" type="text" name="eventtitle" placeholder="Title">'+
'</div>'+
'</div>'+
'<div class="row-fluid">'+
'<div class="control-group span4"><div class="controls"><input style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" id="evendate" class="input-block-level " disabled type="text" name="eventdate" placeholder="">'+
'</div>'+
'</div>'+
'<div class="control-group span4"><div class="controls"><input style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" id="startime" class="input-block-level " type="time" name="Startime" placeholder="Start Time">'+
'</div>'+
'</div>'+
'<div class="control-group span4"><div class="controls"><input id="endtime" style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" class="input-block-level " type="time" name="Endtime" placeholder="End Time">'+
'</div>'+
'</div>'+
'</div>'+
'<div class="control-group"><div class="controls"><select id="notification Type" style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px"class="selectpicker-boo input-block-level" name="Notificationtype">'+
'<option value="dntnotification"> Notification type</option>'+
'<option value="dntnotification">iCal Email</option>'+
'<option value="dntnotification">Simple Email</option>'+
'<option value="dntnotification">Do Not Send Notification</option>'+
'</select>'+
'</div>'+
'</div>'+
'<div class="control-group"><div class="controls"><input id="eventdescription" style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" class="input-block-level" type="text" name="Descripption" placeholder="Description">'+
'</div>'+
'</div>'+
'<div class="control-group"><div class="controls"><select id="eventshareType" style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px"class="selectpicker-boo input-block-level" name="Notificationtype">'+
'<option value="0">Share With</option>'+
'<option value="eventindvidual">Indvidual</option>'+
'<option value="eventgroup">Course</option>'+
'</select>'+
'</div>'+
'</div>'+
'<div id="eventind" style="display:none" class="control-group"><div class="controls"><input style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px" id="evenshareind" class="input-block-level" type="text" >'+
'</div>'+
'</div>'+
'<div id="eventgroup" style="display:none"class="control-group"><div class="controls"><select id="eventsharegroup" style="background-color:rgba(0, 0, 0, 0.1);font-weight:bold;font-size:12px"class="selectpicker-boo input-block-level" name="Notificationtype">'+
'<option value="0">Select</option>'+
'</select>'+
'</div>'+
'</div>',
buttons:{Save:1 },
//focus: "input[name='fname']",
submit:function(e,v,m,f){
title=f.eventtitle;
e.preventDefault();
newtitle = title;
if(newtitle.length==0)
{
bootbox.alert("<b>Title Must Be Filled Out</b>");
$.prompt.show();
}
$.prompt.close();
if (newtitle) {
calendar.fullCalendar('renderEvent',
{
title: newtitle,
start: eventdate,
end: end,
allDay: allDay
},
true // make the event "stick"
);
}
/*if(newtitle){
var rootURL = "services/CalendarService/updateCalendarEvent/"+ espanUserId+"/"+espanUserRole+"/"+title+"/"+eventdate;
$.get(rootURL,function(data) {
});
}*/
calendar.fullCalendar('unselect');
}
},
};
//var title = prompt("Add Events");
var title = prompt(abc);
if (title) {
calendar.fullCalendar('renderEvent',
{
title: title,
start: start,
end: end,
allDay: allDay
},
true // make the event "stick"
);
}
calendar.fullCalendar('unselect');
},
editable: true,
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1)
},
{
title: 'Long Event',
start: new Date(y, m, d-5),
end: new Date(y, m, d-2)
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d-3, 16, 0),
allDay: false
},
{
id: 999,
title: 'Repeating Event',
start: new Date(y, m, d+4, 16, 0),
allDay: false
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false
},
{
title: 'Birthday Party',
start: new Date(y, m, d+1, 19, 0),
end: new Date(y, m, d+1, 22, 30),
allDay: false
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'
}
]
});
});