Was messing around today and came up with a little bookmarklet to create a new Calendar event.

I’m sure it could be greatly improved upon, but for a quick click thing, it’s pretty useful. It takes the Title of the page as the event and prompts you for a date/time. Haven’t tested it without being logged into my google account, so no guarantees there 🙂
Create a new link in the links bar of your browser and paste the following javascript as the URL. (note:IE will say something about the protocol, but just ignore it)

javascript: function pad(d){ return d<10?”0″+d:d; } function gdate(d,t){ var da = d.split( “/” ); var s = da[2] + pad(Number(da[1])) + pad(Number(da[0])); if( t ) { ta = t.split( “:” ); s += “T” + pad(Number(ta[0])) + pad(Number(ta[1])) + “00Z”; } return s; } var d = new Date(); var date = prompt( “Enter Event Date (DD/MM/YYYY): “,pad(d.getDate()) + “/” + pad(d.getMonth()+1) + “/” + d.getFullYear() ); if( date!=null ) { var time = prompt( “Enter Event Start Time in 24 clock format (HH:MM):\n(leave blank for an ‘All-Day Event’)”,pad(d.getHours()) + “:” + pad(d.getMinutes()) ); if( time!=null ) { var gd = gdate(date,time); var w = window.open( ‘http://www.google.com/calendar/event?action=TEMPLATE&text=’ + document.title + ‘&dates=’ + gd + ‘/’ + gd + ‘&details=’ + escape( document.location ) ); } } void(0);