/ /クリックされた特定の日の色を変更する - javascript、jquery、spring-mvc

クリックされた特定の日の色を変更する - javascript、jquery、spring-mvc

どのように私のカレンダーでクリックされた特定の日の色を変更できますか?

これは私のコードです:

selectable: true,
selectHelper: true,
select: function(calEvent, jsEvent, view) {
var moment = $("#calendar").fullCalendar("getDate");
/**
* calEvent is the event object, so you can access it"s properties
*/
if(confirm("Would you like to cancel the meal delivery ?")){
delete event in backend
jQuery.post("/vacation/deleteEvent", { "id": calEvent.id } );

delete in frontend
$(this).css("border-color", "red");
}
},

回答:

回答№1は0

あなたが使用していると思われるJQueryプラグインfullcalendarについては、次のようなタイトルで特定の日の色を変更することができます:

eventRender: function(event, element) {
$where = event.title;
if ($where == "your title")
element.css("background-color", "#bbd2e1");
else
element.css("background-color", "#f0c0cb");
}