[Seaside] Creating a date component to avoid repeating code

Sanjay Minni sm at planage.com
Thu Mar 26 10:23:24 UTC 2015


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
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.

More information about the seaside mailing list