Giter VIP home page Giter VIP logo

Comments (19)

FabioDev84 avatar FabioDev84 commented on May 22, 2024

I also noticed that the time of day selected is always 22:00:00 I would rather have the time Italian ... how could I change this?

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Hi there. I don't quite understand when the local notification should be scheduled. When the date is selected?
But I think your problem is only about the components of the date. NSDateComponents would be much helpful. Here is the sample code:

    NSCalendar *calendar = [NSCalendar currentCalendar];
    NSDateComponents *components = [calendar components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour|NSCalendarUnitMinute|NSCalendarUnitSecond fromDate:_yourSelectedDate];
    // or   NSDateComponents *components = [calendar components:11111100 fromDate:_yourSelectedDate];
    components.hour = 9;
    components.minute = 0;
    components.second = 0;
    NSDate *dateYouNeed = [calendar dateFromComponents:components]; /// 2015-05-23 09:00:00

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

ah ok perfect you have been very kind .. one thing I wanted to ask you when the calendar shows the month names in Italian can not display case in names ... instead of writing in May or May I wrote only in May lowercase .. how can I solve this?

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

I don't know about words of Italian, and the month names are totally generated by the system. But probably you should try to change the headerDateFormat of FSCalendar.

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

Hello then I set headerFormat in this way but continues to give me back

may 2015

instead of May 2015

... where am I doing wrong? because if the months are in English everything is correct? in Italian it provides me with this problem ...

This is how I implemented the header format:

   NSString *format = [NSDateFormatter dateFormatFromTemplate:@"MMMM yyyy" options:0 locale:  [NSLocale currentLocale]];
    [self.calendarView setHeaderDateFormat:format];

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Have you tried this?

 _calendar.headerDateFormat = [NSDateFormatter dateFormatFromTemplate:@"MMMM yyyy" options:0 locale:[NSLocale localeWithLocaleIdentifier:@"it_IT"]];

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

Hello, I tried as I have advised you
_calendar.headerDateFormat = [NSDateFormatter dateFormatFromTemplate: @ "MMMM yyyy" options: 0 locale: [NSLocale localeWithLocaleIdentifier: @ "it_IT"]];

but the result is always the same ... keep me back in may 2015 instead of May 2015 ... I do not understand why the months in English display them properly but not Italian :(

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Hi, I can't figure out the reason. But I am interest on what would there be if you change the local identifier to "zh_CN". I'd like to see whether it displays Chinese words rightly. You can send a screen shot here.

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

chinese

This is the China format from my simulator after implement your code

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Sorry, haven't met that kinda problem before. Though it's not a good idea, you can assign [monthString capitalizedString] to each cell in FSCalendarHeader.

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

I understand .. you think you can solve this problem in fscalendar?

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Just speculation

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

Hello, forgive me, but I'm using the google translator to read your posts and I did not understand your last post ... Could you explain what did you mean? Sorry again for my bad English :)

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Yes, I mean I 'guess' you can solve the problem in FSCalendar, but not sure about it.

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

ok while you explain to me exactly where I should make the change you suggested with [capitalize string]?

from fscalendar.

WenchaoD avatar WenchaoD commented on May 22, 2024

Yes, it means making the first letter uppercase.

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

yes yes, I understood what he meant, I can not understand where to go to change exactly in your code in fs calendar header

from fscalendar.

FabioDev84 avatar FabioDev84 commented on May 22, 2024

?

from fscalendar.

kartikqss avatar kartikqss commented on May 22, 2024

func calendar(calendar: FSCalendar!, hasEventForDate date: NSDate!) -> Bool {
return shouldShowEventDot
}
this method is deprecated.what we use to show colour Dot on all dates of array i.e.["2017-05-12","2017-12-05"].

from fscalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.