How to set calendar type to Gregorian when app launch?How can I set default calendar to gregorian in the Whole project? Objective cHow to change the name of an iOS app?How to link to apps on the app storeHow can I make a UITextField move up when the keyboard is present - on starting to edit?Why does viewWillAppear not get called when an app comes back from the background?Is it mandatory that an iOS app should work with all calendarsNSDateFormatter not behaving properly when converting from Buddhist calendar to Gregorian calendar date formatsWill iOS launch my app into the background if it was force-quit by the user?How do I load an HTTP URL with App Transport Security enabled in iOS 9?React native - Calendar typeSet calendar type on whole application

Is there a way to say "double + any number" in German?

Pronouns when writing from the point of view of a robot

What does the ISO setting for mechanical 35mm film cameras actually do?

Tile the chessboard with four-colored triominoes

Our group keeps dying during the Lost Mine of Phandelver campaign. What are we doing wrong?

Write The Shortest Program To Check If A Binary Tree Is Balanced

Which pronoun to replace an infinitive?

What is it exactly about flying a Flyboard across the English channel that made Zapata's thighs burn?

Do some languages mention the top limit of a range first?

I was contacted by a private bank overseas to get my inheritance

What was the role of Commodore-West Germany?

What is the German idiom or expression for when someone is being hypocritical against their own teachings?

3 beeps on a 486 computer with an American Megatrends bios?

Why is the Vasa Museum in Stockholm so Popular?

The meaning of "scale" in "because diversions scale so easily wealth becomes concentrated"

Why private jets such as GulfStream ones fly higher than other civil jets?

How to sort List<T> in c#

Getting Lost in the Caves of Chaos

How to check a file was encrypted (really & correctly)

How easy is it to get a gun illegally in the United States?

How does LIDAR avoid getting confused in an environment being scanned by hundreds of other LIDAR?

List: Behavioural characteristics of key Ito processes used in finance

Probably terminated or laid off soon; confront or not?

In MTG, was there ever a five-color deck that worked well?



How to set calendar type to Gregorian when app launch?


How can I set default calendar to gregorian in the Whole project? Objective cHow to change the name of an iOS app?How to link to apps on the app storeHow can I make a UITextField move up when the keyboard is present - on starting to edit?Why does viewWillAppear not get called when an app comes back from the background?Is it mandatory that an iOS app should work with all calendarsNSDateFormatter not behaving properly when converting from Buddhist calendar to Gregorian calendar date formatsWill iOS launch my app into the background if it was force-quit by the user?How do I load an HTTP URL with App Transport Security enabled in iOS 9?React native - Calendar typeSet calendar type on whole application






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Does anyone know how to set calendar type to Gregorian when the app is launch? Most of users of the app that I created use Buddhist calendar, but I want to change it to Gregorian so Datepicker in the app use Gregorian.



Here is the code that I put in app delegate.



if (self.gregorian == nil) 
NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
self.gregorian = temc;










share|improve this question


























  • Can you show your codes?

    – Raptor
    Mar 27 at 3:56











  • I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

    – Rezazulman
    Mar 27 at 3:58












  • Please put the code in your question by editing it; codes in comment are very hard to read.

    – Raptor
    Mar 27 at 4:03











  • Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

    – iSrinivasan27
    Mar 27 at 4:34

















0















Does anyone know how to set calendar type to Gregorian when the app is launch? Most of users of the app that I created use Buddhist calendar, but I want to change it to Gregorian so Datepicker in the app use Gregorian.



Here is the code that I put in app delegate.



if (self.gregorian == nil) 
NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
self.gregorian = temc;










share|improve this question


























  • Can you show your codes?

    – Raptor
    Mar 27 at 3:56











  • I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

    – Rezazulman
    Mar 27 at 3:58












  • Please put the code in your question by editing it; codes in comment are very hard to read.

    – Raptor
    Mar 27 at 4:03











  • Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

    – iSrinivasan27
    Mar 27 at 4:34













0












0








0








Does anyone know how to set calendar type to Gregorian when the app is launch? Most of users of the app that I created use Buddhist calendar, but I want to change it to Gregorian so Datepicker in the app use Gregorian.



Here is the code that I put in app delegate.



if (self.gregorian == nil) 
NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
self.gregorian = temc;










share|improve this question
















Does anyone know how to set calendar type to Gregorian when the app is launch? Most of users of the app that I created use Buddhist calendar, but I want to change it to Gregorian so Datepicker in the app use Gregorian.



Here is the code that I put in app delegate.



if (self.gregorian == nil) 
NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
self.gregorian = temc;







ios objective-c






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 27 at 4:07







Rezazulman

















asked Mar 27 at 3:53









RezazulmanRezazulman

135 bronze badges




135 bronze badges















  • Can you show your codes?

    – Raptor
    Mar 27 at 3:56











  • I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

    – Rezazulman
    Mar 27 at 3:58












  • Please put the code in your question by editing it; codes in comment are very hard to read.

    – Raptor
    Mar 27 at 4:03











  • Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

    – iSrinivasan27
    Mar 27 at 4:34

















  • Can you show your codes?

    – Raptor
    Mar 27 at 3:56











  • I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

    – Rezazulman
    Mar 27 at 3:58












  • Please put the code in your question by editing it; codes in comment are very hard to read.

    – Raptor
    Mar 27 at 4:03











  • Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

    – iSrinivasan27
    Mar 27 at 4:34
















Can you show your codes?

– Raptor
Mar 27 at 3:56





Can you show your codes?

– Raptor
Mar 27 at 3:56













I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

– Rezazulman
Mar 27 at 3:58






I do not have any Idea how to do it yet. But this is what I tried. I put this line of code in app delegate. if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc; if (self.gregorian == nil) NSCalendar* temc = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; self.gregorian = temc;

– Rezazulman
Mar 27 at 3:58














Please put the code in your question by editing it; codes in comment are very hard to read.

– Raptor
Mar 27 at 4:03





Please put the code in your question by editing it; codes in comment are very hard to read.

– Raptor
Mar 27 at 4:03













Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

– iSrinivasan27
Mar 27 at 4:34





Possible duplicate of How can I set default calendar to gregorian in the Whole project? Objective c

– iSrinivasan27
Mar 27 at 4:34












2 Answers
2






active

oldest

votes


















1














You simply need to set the calendar property of your date picker.



Something like:



self.datePicker.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];


or, if you have set your property,



self.datePicker.calendar = self.gregorian


There is no way to change the "default" calendar for your app so that date pickers implicitly use the Gregorian calendar.






share|improve this answer

























  • I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

    – Rezazulman
    Mar 28 at 2:20


















-1














date picker by default is Gregorian



 var datePicker = UIDatePicker()
datePicker.calender = .gregorian





share|improve this answer



























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369539%2fhow-to-set-calendar-type-to-gregorian-when-app-launch%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You simply need to set the calendar property of your date picker.



    Something like:



    self.datePicker.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];


    or, if you have set your property,



    self.datePicker.calendar = self.gregorian


    There is no way to change the "default" calendar for your app so that date pickers implicitly use the Gregorian calendar.






    share|improve this answer

























    • I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

      – Rezazulman
      Mar 28 at 2:20















    1














    You simply need to set the calendar property of your date picker.



    Something like:



    self.datePicker.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];


    or, if you have set your property,



    self.datePicker.calendar = self.gregorian


    There is no way to change the "default" calendar for your app so that date pickers implicitly use the Gregorian calendar.






    share|improve this answer

























    • I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

      – Rezazulman
      Mar 28 at 2:20













    1












    1








    1







    You simply need to set the calendar property of your date picker.



    Something like:



    self.datePicker.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];


    or, if you have set your property,



    self.datePicker.calendar = self.gregorian


    There is no way to change the "default" calendar for your app so that date pickers implicitly use the Gregorian calendar.






    share|improve this answer













    You simply need to set the calendar property of your date picker.



    Something like:



    self.datePicker.calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];


    or, if you have set your property,



    self.datePicker.calendar = self.gregorian


    There is no way to change the "default" calendar for your app so that date pickers implicitly use the Gregorian calendar.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 27 at 4:44









    Paulw11Paulw11

    73.9k10 gold badges96 silver badges112 bronze badges




    73.9k10 gold badges96 silver badges112 bronze badges















    • I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

      – Rezazulman
      Mar 28 at 2:20

















    • I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

      – Rezazulman
      Mar 28 at 2:20
















    I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

    – Rezazulman
    Mar 28 at 2:20





    I have set the property of the calendar. The calendar now appear in Gregorian format. However, it seem there is still something wrong with the date that make my search function does not work. But If I change the device calendar to Gregorian, it worked.

    – Rezazulman
    Mar 28 at 2:20













    -1














    date picker by default is Gregorian



     var datePicker = UIDatePicker()
    datePicker.calender = .gregorian





    share|improve this answer





























      -1














      date picker by default is Gregorian



       var datePicker = UIDatePicker()
      datePicker.calender = .gregorian





      share|improve this answer



























        -1












        -1








        -1







        date picker by default is Gregorian



         var datePicker = UIDatePicker()
        datePicker.calender = .gregorian





        share|improve this answer













        date picker by default is Gregorian



         var datePicker = UIDatePicker()
        datePicker.calender = .gregorian






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 at 4:54









        Rana Ali WaseemRana Ali Waseem

        459 bronze badges




        459 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55369539%2fhow-to-set-calendar-type-to-gregorian-when-app-launch%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript