How can a user pick a date from a calendar with LC? - Solved

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

How can a user pick a date from a calendar with LC? - Solved

Post by DR White » Fri Jan 08, 2016 2:53 pm

I need the user to be able to pick a future date from a calendar? I have looked around and have not found any good examples and nothing in the dictionary.
How can this be done with LC?

Thanks,

David
Last edited by DR White on Fri Jan 08, 2016 3:54 pm, edited 1 time in total.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How can a user pick a date from a calendar with LC?

Post by Klaus » Fri Jan 08, 2016 3:00 pm

Hi David,

go here: http://revonline.runrev.com and search for calendar.
I am sure there will be a couple of example stacks.


Best

Klaus

DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: How can a user pick a date from a calendar with LC?

Post by DR White » Fri Jan 08, 2016 3:20 pm

Klaus,

Is there a way that I can launch the native android calendar picker?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How can a user pick a date from a calendar with LC?

Post by Klaus » Fri Jan 08, 2016 3:32 pm

Sorry, no idea...

DR White
Posts: 686
Joined: Fri Aug 23, 2013 12:29 pm
Location: Virginia, USA

Re: How can a user pick a date from a calendar with LC? - So

Post by DR White » Fri Jan 08, 2016 3:54 pm

Klaus,

Sorry to bother anybody.

Dummy Me!

I am just old school.

I forgot that everybody uses "Date Pickers" now, and I did find some good examples of LC "Pickers".

Thanks,

David

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How can a user pick a date from a calendar with LC? - So

Post by Klaus » Fri Jan 08, 2016 4:16 pm

Hi David,

great you found something, mobile is not my world, I'm also way too old school :D


Best

Klaus

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: How can a user pick a date from a calendar with LC? - So

Post by SparkOut » Fri Jan 08, 2016 11:12 pm

Calendar pickers still need to be coded around for dates prior to 1970 on Windows. And don't say this is a "bug" on Windows. It can be coded around in script, why can't the coding around be done in the engine?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9836
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How can a user pick a date from a calendar with LC? - So

Post by FourthWorld » Sat Jan 09, 2016 3:46 pm

SparkOut wrote:Calendar pickers still need to be coded around for dates prior to 1970 on Windows. And don't say this is a "bug" on Windows. It can be coded around in script, why can't the coding around be done in the engine?
Not specific to Windows; Linux works the same way.

And apparently Mark Waddingham agrees with you that it would be ideal to handle this in the engine:
http://quality.livecode.com/show_bug.cgi?id=4941

In the meantime, Malte's library can handle that and much more:
https://github.com/derbrill/libdate
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: How can a user pick a date from a calendar with LC? - So

Post by SparkOut » Sat Jan 09, 2016 4:20 pm

Yes, I know both of those. But the date of Mark's bug report doesn't inspire much hope that it will ever be fixed.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9836
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: How can a user pick a date from a calendar with LC? - So

Post by FourthWorld » Sat Jan 09, 2016 7:50 pm

SparkOut wrote:Yes, I know both of those. But the date of Mark's bug report doesn't inspire much hope that it will ever be fixed.
Maybe. In practical terms this only affects a somewhat narrow range of edge cases (indeed that's how the OSes have been able to survive so long without providing extended date support in their APIs), and with LiveCode the community has stepped up to fill the gap with libraries for this, most recently Malte's.

So yes, it'll be great when the more urgent priorities that require engine modification are done (Cocoa and Unicode were huge tasks, and now 64-bit OS X and the Builder extensibility subsystem are big tasks too), but in the meantime anyone needing to handle extended date ranges on all supported platforms can do so, thanks to community members like Malte.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: How can a user pick a date from a calendar with LC? - So

Post by SparkOut » Sat Jan 09, 2016 7:58 pm

I'm not sure I agree that date of birth handling is an edge case, but yeah. Still, engine refactoring and all the big projects were never even heard of when the bug was recorded. So I guess it will be workarounds required for the future too.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”