[ic] Passing a date into widget date selector

Jure Kodzoman jure at plsavez.hr
Tue Oct 17 03:02:13 EDT 2006


On Mon, 2006-10-16 at 17:21 +0100, graham hadgraft wrote:
> I am using the date selector on a front end page i am sending a date
> to a page and would then like the date selector to default to that
> date ready for user input.
> 
> I am passing the date into this page with another widget selector.
> 
> Is it possible to pass a date into the date selector widget.  I cant
> seem to find any real docs on the date selector widget.

i use it in table editor as:

[cgi name=time set="[time]%Y-%m-%d[/time]" hide=1]
[cgi name=counter set="[counter file='products/vijesti.autonumber']" hide=1]

[table-editor auto_secure=1 cgi=1
        table=vijesti
        key=`$CGI->{counter}`
        ui_hide_key=1

        ui_data_fields="code posted_by posted_on title grupa intro body url"
        default.posted_by=[sql-param username]
        default.posted_on=`$CGI->{time}`

        cancel_text="Odustani"
        next_text="Dodaj clanak"
        mv_nextpage="adm/vijesti"
/]

I posted the upper example, just in case you use table editor.

if you use [display] you should also pass default=some_date, 
but without the tricks needed for table editor. 

[display default=[cgi time] interpolate=1 .... ] could work (haven't tried it myself)


Hope it helps :)

Jure Kodzoman



More information about the interchange-users mailing list