[SMARTY] Smarty DHTMLCalendar plugin (FAO Boots)

Marcus Bointon <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
I'm using Boots' DHTML calendar plugin (http://smarty.incutio.com/? 
page=DHTMLCalendarPlugin), and it's working nicely. One small thing  
is stopping me though - how to set an initial date? The docs allow  
for a 'date' parameter, but there's no special handling for it to  
deliver it in the right format (as a JS date object) for the calendar  
to pick up. I tend to handle dates in PHP as ISO format strings, but  
I've no idea how to turn that into a JS date object - I guess it  
would need to render to something like:

<script type="text/javascript">Calendar.setup({"date":Date.parse 
("some date  
string"),"inputField":"datetime","button":"opencalendar","ifFormat":"% 
Y-%m-%d %H:%M"});</script>

but I don't know what format the date string should be in for JS to  
handle it right.

Or have I got this completely wrong?

Marcus
-- 
Marcus Bointon
Synchromedia Limited: Putting you in the picture
[email protected] | http://www.synchromedia.co.uk

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.