Hi all,
it seems that mobilePickDate is only supported on iOS when using dateTime. What do you folks do on the droid if you need a date + time?
Best,
Malte
Date and Time picker?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Date and Time picker?
Hi Malte,
So far I have not found a very efficient way to choose both a date and time using mobilePickDate on Android. I have a kind of ridiculous work-around that I use on my Android app that has worked for me so far. Here's the code:
Picking hours using an Android doesn't work very well at all, and that's why I had to do the "add 17 to t2[1]" command, among others.
Here's a link to a forum post where some people have talked about this:
http://forums.runrev.com/viewtopic.php?f=7&t=12735
Good luck! If you find out a better way to pick date/time, please post it! I'm sure we're not the only 2 that need a better way to pick date/time.
-Jacob
So far I have not found a very efficient way to choose both a date and time using mobilePickDate on Android. I have a kind of ridiculous work-around that I use on my Android app that has worked for me so far. Here's the code:
Code: Select all
local whatTime = 1
local t1
local t2
on chooseDate
if whatTime is 1 then
put empty into t1
mobilePickDate
if the result is not "cancel" then
put the result into t1
set the itemdelimiter to slash
add 1 to item 2 of t1
end if
add 1 to whatTime
send mouseDown to me in .01 sec
else if whatTime is 2 then
put empty into t2
mobilePickDate "time"
if the result is not "cancel" then
put the result into t2
split t2 by ":"
if t2[2] contains "PM" then
add 17 to t2[1]
replace " PM" with empty in t2[2]
else
replace "12" with "0" in t2[1]
add 5 to t2[1]
replace " AM" with empty in t2[2]
end if
if t2[1] >= 24 then
put (t2[1] mod 24) into t2[1]
end if
combine t2 by ":"
end if
add 1 to whatTime
send mouseDown to me in .01 sec
else
set the text of me to (t1&&t2)
put 1 into whatTime
end if
end chooseDate
Here's a link to a forum post where some people have talked about this:
http://forums.runrev.com/viewtopic.php?f=7&t=12735
Good luck! If you find out a better way to pick date/time, please post it! I'm sure we're not the only 2 that need a better way to pick date/time.
-Jacob
Re: Date and Time picker?
Hi Jacob,
please excuse my late reply. I guess this smells like mimicing a control... I hope to get around to doing that at some point.
Cheers,
Malte
please excuse my late reply. I guess this smells like mimicing a control... I hope to get around to doing that at some point.
Cheers,
Malte