[Seaside] Creating a date component to avoid repeating code
Joachim Tuchel
jtuchel at objektfabrik.de
Thu Mar 26 10:51:22 UTC 2015
Hi Sanjay,
Subclass WAComponent, implement your render code in renderContentOn:, that's basically it.
It is probably a good idea to add an instvar for the date instance to that new Component.
Hth,
Joachim
Am 26.03.2015 11:23 schrieb Sanjay Minni <sm at planage.com>:
>
> Hi,
>
> How can I create a date component when I can use at several places.
> Currently I end up repeating code below wherever I need to accept date (with
> the JQuery date picker).
> I would attempt something similar to accept currency (right justified, fixed
> decimal places and commas)
> ===
> html textInput
> value: ( tr date printFormat: #(1 2 3 $/ 1 1 2) );
> placeholder: 'dd/mm/yyyy';
> callback: [ :value | <method>: ( Date readFrom: value pattern:
> 'dd/mm/yyyy' ) ];
> script: (html jQuery new datepicker
> autoSize: true;
> dateFormat: 'dd/mm/yy';
> changeMonth: true;
> changeYear: true;
> onSelect: ( html jQuery ajax serializeThis ) )
> ===
>
> regards
> Sanjay
>
>
>
> -----
> ---
> Regards, Sanjay
> --
> View this message in context: http://forum.world.st/Creating-a-date-component-to-avoid-repeating-code-tp4815256.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
More information about the seaside
mailing list