Page 1 of 1

mobilePickdate problem

Posted: Fri Sep 26, 2014 6:12 am
by Jellobus
Hi all,

With mobilePickdate on Android platform, Sep 01, 1914 and Sep 01, 2014 and it returns same value of 9/01/14.

Is there any way to get a four digit year value on both ios and android?

Cheers,

Louis

Re: mobilePickdate problem

Posted: Fri Sep 26, 2014 11:15 am
by Mark
Hi Louis,

That is funny, because the documentation says it should return a value in seconds rather than a date. Could you post your entire script?

Mark

Re: mobilePickdate problem

Posted: Fri Sep 26, 2014 6:13 pm
by Jellobus
Hi Mark,

This is the script,

Code: Select all

local tDateResult
on mouseUp
   mobilePickDate "date"
   put the result into tDateResult
   convert tDateResult from seconds to internet date
   put tDateResult into field 1
end mouseUp
Internet date supposed to give four digit year value I think.. but it doesn't. :roll:
Anything wrong with this script?


Cheers,

Louis

Re: mobilePickdate problem

Posted: Fri Sep 26, 2014 7:34 pm
by Mark
Hi Louis,

Nothing is wrong with your script. Apparently, the date picker doesn't return the seconds but a date in the format mm/dd/yy. Probably, this is okay for dates after 1 Jan. 1970 but not for earlier dates. I think this is a bug in LiveCode.

Kind regards,

Mark

Re: mobilePickdate problem

Posted: Fri Sep 26, 2014 8:33 pm
by Jellobus
Hi Mark,

Thanks for clarifying that it was a bug. I decided to use mobilePick instead of mobilePickdate. but it looks not as fancy as a wheel type native date picker. It's just plain field with list of contents...Can I change it to any other style? also I have a problem with cancel button.. I like to exit mouseUp upon user press a cancel button but it seems not working with my script.

Code: Select all

on mouseUp   
   mobilePick tMonths, tInitialIndex,"cancel"
   if it is "cancel" then
      put empty into tDateResult
      put empty into field 1
      exit mouseUp
   end if
   put the result into tDateResult
   put tDateResult into field 1
end mouseUp
Cheers,

Louis