Smarty DHTMLCalendar plugin (FAO Boots)

From: Date: Fri, 30 Sep 2005 17:02:25 +0000
Subject: Smarty DHTMLCalendar plugin (FAO Boots)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-13068@lists.php.net to get a copy of this message
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 marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

« previous php.smarty.general (#13068) next »