|
Posted by Marcus Bointon on 09/30/05 20:02
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
Navigation:
[Reply to this message]
|