iphonepickdate

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
HengeDK
Posts: 14
Joined: Wed Aug 29, 2012 9:09 pm

iphonepickdate

Post by HengeDK » Wed Oct 10, 2012 8:19 pm

another one ;-)

can't find anything on setting the iphonepickdate to DD/MM/YYYY

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4168
Joined: Sun Jan 07, 2007 9:12 pm

Re: iphonepickdate

Post by bn » Wed Oct 10, 2012 9:21 pm

which LiveCode version do you use?

From 5.5 the dictionary has a good example if you look for iPhonePickDate or mobilePickDate

Kind regards

Bernd

HengeDK
Posts: 14
Joined: Wed Aug 29, 2012 9:09 pm

Re: iphonepickdate

Post by HengeDK » Wed Oct 10, 2012 9:26 pm

Hi Bernd

I use 5.5.3 and I see nothing about settings the date to DD/MM/YYYY

not under iPhonePickDate or mobilepickdate

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4168
Joined: Sun Jan 07, 2007 9:12 pm

Re: iphonepickdate

Post by bn » Wed Oct 10, 2012 9:28 pm

Sorry I misunderstood probably.

You want to reverse the display of the pickWheel? If so I don't know of any way to do this.

Kind regards

Bernd

HengeDK
Posts: 14
Joined: Wed Aug 29, 2012 9:09 pm

Re: iphonepickdate

Post by HengeDK » Wed Oct 10, 2012 9:34 pm

Hi Bernd

the result I get back from the pick wheel is 04/16/12 and I want 16/04/12

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4168
Joined: Sun Jan 07, 2007 9:12 pm

Re: iphonepickdate

Post by bn » Wed Oct 10, 2012 11:14 pm

I think you can run into the problem of the language setting.
You could use a systemdate but in the simulator it is the same as the date i.e. the english date 04/16/12
I don't know how this will change if you use it on a device with the systemDate set to 16/04/12.
You could test to convert the result to systemDate and see what that does. If it works you would have the expected date format for the system setting.

If that does not work you could reformat 04/16/12

Code: Select all

on mouseUp
   put "04/16/12" into tEnglishDate
   set the itemDelimiter to "/"
   put tEnglishDate into tLocalDate
   put item 2 of tEnglishDate into item 1 of tLocalDate
   put item 1 of tEnglishDate into item 2 of tLocalDate
   put tLocalDate 
end mouseUp
This all depends on where you want your app to work, internationally or locally.
maybe there is a more elegant solution but I am not aware of any.
KInd regards
Bernd

HengeDK
Posts: 14
Joined: Wed Aug 29, 2012 9:09 pm

Re: iphonepickdate

Post by HengeDK » Thu Oct 11, 2012 7:46 pm

Hi Bernd

Thanks for your help

Yes I could use your solution.
Then I need to check for language setting and so on.
I think I would report this as an bug.

Here in Eurpe as you know we use DD/MM/YYYY

On the real phone if you use the pickwheel you will get DD/MM/YYYY
if you have set your language to local

Then I use the pickwheel in my app on the phone I get MM/DD/YY

So it must be a bug in LC

Post Reply