Thanks, this looks helpful - I'll try to add this in to the documentation somewhere.

-Yaron

On Mon, Jul 27, 2009 at 12:45 AM, Patrick Nagel <mail@patrick-nagel.net> wrote:
Hi Yaron,

On 2009-07-25 01:39, Yaron Koren wrote:
[...]
> I would recommend instead following the code in SF itself, such as, as
> you note, the function dateEntryHTML() in /includes/SF_FormInputs.inc.
> If you use that as the model for your function, you should be alright.
> Note that global variables will still be accessible in your function,
> even though it's in a different extension.

Ok, that pointed me into the right direction, thanks!

I have now created my own SFCustomDateInput mini-extension which provides
'input type=customdate' (which adds Today and Yesterday buttons to 'input
type=date'). While I was at it, I also made a 'customdatetime' which reuses the
customdate code and removes the input field for seconds, since we never will
have to input such a precise point in time.

I have attached the extension as it is now. I guess its functionality won't be
very useful to anybody, but it may be useful as a sample for people who want to
create similar mini-extensions. It contains a lot of duplicated code from
includes/SF_FormInputs.inc.

Patrick.

--
Key ID: 0x86E346D4            http://patrick-nagel.net/key.asc
Fingerprint: 7745 E1BE FA8B FBAD 76AB 2BFC C981 E686 86E3 46D4

------------------------------------------------------------------------------

_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel