我在我的应用程序和它的工作中使用FullCalendar.
现在我需要将意大利假日的颜色改为红色.我是在周末做的,但是:
这是我的代码:
<script>
var calendar = $('#calendar').fullCalendar({
header: {
left: 'prev',
center: 'title',
right: 'next',
},
defaultView: 'month',
lang: 'it',
height: 600,
dayClick: function(date, jsEvent, view) {
// Changing BG color
$(this).css('background-color', 'green');
//Create modal here
$('#myModal').modal();
// Show Date in SPAN
$('#spnDate').html(date.format('DD/MM/YYYY'));
// Put Date value in a variable
$('#date').attr('value', date.format('DD/MM/YYYY'));
},
editable: true,
});
</script>
Run Code Online (Sandbox Code Playgroud) 我有一个NSMutableArray名叫动物.我需要创建一个NSMutableDictionary这样的动作数组中的所有名称都Keys以特定的第一个字母=开头Values.
这是动物阵列:
NSMutableArray *animals = [NSMutableArray arrayWithObjects:@"Bear", @"Black Swan", @"Buffalo", @"Camel", @"Cockatoo", @"Dog", @"Donkey", @"Emu", @"Giraffe", @"Greater Rhea", @"Hippopotamus", @"Horse", @"Koala", @"Lion", @"Llama", @"Manatus", @"Meerkat", @"Panda", @"Peacock", @"Pig", @"Platypus", @"Polar Bear", @"Rhinoceros", @"Seagull", @"Tasmania Devil", @"Whale", @"Whale Shark", @"Wombat", nil];
Run Code Online (Sandbox Code Playgroud)
这是我的代码,将其设置为MutableDictionary:
for(NSString *str in animals) {
NSString *firstLetter = [str substringToIndex:1];
NSArray *newArr = [NSArray arrayWithObject:str];
[myMutableDictionary setValue:newArr forKey:firstLetter];
}
Run Code Online (Sandbox Code Playgroud)
问题是每个键只设置一个值,但我需要所有对象都有一个具有相同值的第一个字母.例如value ='b' - > @"Bear",@"Black Swan",@"Buffalo".