Page 1 of 4

Calendar widget

Posted: Thu Oct 22, 2020 7:01 pm
by stam
Hi all,

I tried to use the (free) Calendar widget on the liveCode store but can't get it to load... i copied the downloaded file to the extensions folder and restarted LC 9.6.1, but there is no way to add this to a card. I also copied it to a 'plugins' folder in the same directory that contains the the extensions folder as I've noticed some plugins won't work otherwise, but again no dice.
No calendar control shows up in the tools palette or in the 'add widget' menu...

What i'm really looking for is a simple date picker.

Can anyone advise if i'm doing something wrong when trying to install this widget or perhaps point me to a better widget?

many thanks
Stam

Re: Calendar widget

Posted: Thu Oct 22, 2020 7:14 pm
by stam
meh please ignore this post... just realised what the process is to install widgets (colour me embarrassed :D )

Re: Calendar widget

Posted: Mon Oct 26, 2020 5:33 pm
by stam
On this note i'll just also add that the best widget i found was Hermann's date picker widget. Not only does it provide a nice API but when viewing the widget's properties in the inspector it exposes the properties so that they can be modified to your needs/taste visually in the IDE... very cool.
(obviously since i've now ...erm.. paid attention on how to install these ;D)

Anyone using anything different/better?

Re: Calendar widget

Posted: Sun Nov 22, 2020 9:50 pm
by marksmithhfx
stam wrote:
Thu Oct 22, 2020 7:14 pm
meh please ignore this post... just realised what the process is to install widgets (colour me embarrassed :D )
Hi, I just downloaded the calendar.lce file myself but having never installed an .lce file am unsure of what to do next. Would you mind expanding on your "meh" :)

Thanks
Mark

Re: Calendar widget

Posted: Mon Nov 23, 2020 10:37 am
by elanorb
Hi Mark

You install an extension using the Extension Manager from the Tools Palette, just click the '+' button and select your .lce file to install it. It should then show up in the Tools Palette. You can also use the Extension Manager to choose which widgets to show in the Tools Palette, load on startup etc.

I hope that helps.

Kind regards

Elanor

Re: Calendar widget

Posted: Mon Nov 23, 2020 3:10 pm
by stam
marksmithhfx wrote:
Sun Nov 22, 2020 9:50 pm
stam wrote:
Thu Oct 22, 2020 7:14 pm
meh please ignore this post... just realised what the process is to install widgets (colour me embarrassed :D )
Hi, I just downloaded the calendar.lce file myself but having never installed an .lce file am unsure of what to do next. Would you mind expanding on your "meh" :)

Thanks
Mark
Hi Mark,
What Elanor said - Tools menu -> Extension manager -> "+" (top right) & select the '.lce' file

Re: Calendar widget

Posted: Tue Nov 24, 2020 4:42 pm
by marksmithhfx
[/quote]
Hi Mark,
What Elanor said - Tools menu -> Extension manager -> "+" (top right) & select the '.lce' file
[/quote]

Great, thanks guys. I'll be plugging it in tomorrow so your comments are appreciated.

Best,
Mark

Re: Calendar widget

Posted: Sat Nov 28, 2020 9:03 pm
by marksmithhfx
marksmithhfx wrote:
Tue Nov 24, 2020 4:42 pm
Hi Mark,
What Elanor said - Tools menu -> Extension manager -> "+" (top right) & select the '.lce' file
[/quote]

Great, thanks guys. I'll be plugging it in tomorrow so your comments are appreciated.

Best,
Mark
[/quote]

Hi everyone,

Ok, just so I am sure I am not missing a beat, the calendar widget that appears on the LC toolbar does not return a date format that is understood by the LC convert function?

I tried (using a standard built in LC date, the short date)

Code: Select all

put the short date into tDate
convert tDate to dateItems
put tDate
and predictably got 2020,11,28,0,0,0,7 (it being 7:56 PM on a Saturday evening when I did this).

I then tried the same conversion using the date format the widget returns, which is YYYY-MM-DD ie:

Code: Select all

put "2020-11-28" into tDate
convert tDate to dateItems
put tDate
and got "2020-11-28" as an answer. ie. no conversion.

Just trying to make sure I am not missing something obvious before I role my own "yyyy-mm-dd" to "mm/dd/yy" conversion routine.

Thanks

Re: Calendar widget

Posted: Sat Nov 28, 2020 9:29 pm
by Klaus
Hi Mark,

yep, the format of the date returned from the widget is erm. un-LC-like, to say the least. :D
Unfortunaltey this is not recognized by LCs "convert" function

So the answer is you need to write a little function which formats that date to a LC friendly one.


Best

Klaus

P.S.
Sounds like a nice enhancement to LC, since this is also the format SQL uses.
Will file an enhancement request.

Re: Calendar widget

Posted: Sat Nov 28, 2020 9:37 pm
by Klaus

Re: Calendar widget

Posted: Sun Nov 29, 2020 5:04 pm
by marksmithhfx
Klaus wrote:
Sat Nov 28, 2020 9:37 pm
And done:https://quality.livecode.com/show_bug.cgi?id=23004
and Dusted 8)

Re: Calendar widget

Posted: Sun Nov 29, 2020 9:32 pm
by marksmithhfx
Klaus wrote:
Sat Nov 28, 2020 9:37 pm
And done:https://quality.livecode.com/show_bug.cgi?id=23004
Better version. This one handles "date addition" better. Put in 2020-02-31 (Feb 31) and it will return 03/02/20 (Mar 2)

Re: Calendar widget

Posted: Sun Nov 29, 2020 9:35 pm
by Klaus
marksmithhfx wrote:
Sun Nov 29, 2020 9:32 pm
Put in 2020-02-31 (Feb 31)
I would never do that! :-)

Re: Calendar widget

Posted: Mon Nov 30, 2020 12:12 am
by SparkOut
How does it deal with 1967-02-24?

Re: Calendar widget

Posted: Mon Nov 30, 2020 12:47 am
by marksmithhfx
SparkOut wrote:
Mon Nov 30, 2020 12:12 am
How does it deal with 1967-02-24?
Pretty good I think. I had to figure out the Calendar widget anyway so I put the conversion routines into the test stack. So far so good, although it seems seriously intolerant of anything that might be an illegal date.