Page 1 of 1

calendar: return unix timestamp & popup event

PostPosted: Mon Nov 05, 2007 4:20 pm
by petaflot
it would be really usefull if the calendar could fill a hidden field containing the UNIX timestamp of the date displayed in the form.

the visible input field should then have a prefix to ease processing of the post variables, like

<input type='hidden' name='some_date' value='1194275235' />
<input type='text' name='nopost_some-date' value='2007-11-05 16:07' onClick='doSomething' />


I tried to pop-up the calendar using <input type='image' /> but it doesn't work. on the other hand, removing the "set date" button and using the input field for the click event proves quite nice, we can then remove the "on click, if visible then hide"


integration in webpages seems rather poor to me. in php for instance, I would like use something like

function generatePopupCalendar( $initial_timestamp, $name_of_input_field ) {
// some stuff to output the code and include necessarary libraries

and no need to copy/paste tons of code from a sample page to other files!!!

otherwise, the applets are really cool, I'm looking forward to using them on my pages