小编Sat*_*tar的帖子

将意大利假期添加到fullcalendar中

我在我的应用程序和它的工作中使用FullCalendar.

现在我需要将意大利假日的颜色改为红色.我是在周末做的,但是:

  1. 我不知道如何在日历中添加假期.
  2. 我怎样才能改变颜色.

这是我的代码:

<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)

javascript fullcalendar

2
推荐指数
1
解决办法
6503
查看次数

NSMutableDictionary setValue:/ forKey:?

我有一个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".

iphone objective-c ios

2
推荐指数
1
解决办法
238
查看次数

标签 统计

fullcalendar ×1

ios ×1

iphone ×1

javascript ×1

objective-c ×1