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;
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
add a comment |
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
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
add a comment |
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
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
ios objective-c
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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.
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
add a comment |
date picker by default is Gregorian
var datePicker = UIDatePicker()
datePicker.calender = .gregorian
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
date picker by default is Gregorian
var datePicker = UIDatePicker()
datePicker.calender = .gregorian
add a comment |
date picker by default is Gregorian
var datePicker = UIDatePicker()
datePicker.calender = .gregorian
add a comment |
date picker by default is Gregorian
var datePicker = UIDatePicker()
datePicker.calender = .gregorian
date picker by default is Gregorian
var datePicker = UIDatePicker()
datePicker.calender = .gregorian
answered Mar 27 at 4:54
Rana Ali WaseemRana Ali Waseem
459 bronze badges
459 bronze badges
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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