Vista-like Ajax Calendar version 2 released

Vista-like Ajax Calendar version 2 released – php, css, ajax, javascript, vista, calendar, mootools, datepicker, vlacalendar

A new version of my Vista-like Ajax Calendar (vlaCalendar) has been released!

The vlaCalendar is a unobtrusive web version of the slick and profound Windows Vista taskbar calendar, by use of the mootools javascript framework, AJAX, XHTML, CSS and PHP.

Key features:

  • Authentic Vista look-and-feel
    • Quick navigation by jumping back and forth between months, years and decades without drop-down boxes
    • Smooth transition animations
  • Customizable features
  • Lightweight (compressed 8,50kB)

New features in version 2:

  • Datepicker functionality (!)
  • Both mootools version 1.11 and 1.2 beta2 compatible
  • Cleaner and more developer centered - easily editable - CSS, PHP and javascript code
    • Easily changeable date labels (e.g. different languages)
    • Easily stylable. Styles are created on top of the general style; the download include two example styles
    • Both normal and datepicker calendar can be instantiated multiple times

The Vista-like Ajax Calendar version 2 script is licensed under the Creative Commons Attribution- NonCommercial 3.0 License.

Documentation, including (code) examples, and the download are available here.

Update June 04, 2008: Added mootools 1.2 beta2 compatibility
Update June 10, 2008: Working on mootools release 1.2 compatibility
Update July 2, 2008: vlaCalendar version 2.1 released, compatible with mootools release 1.2

Author rcz Time May 1, 2008 Comment on 'Vista-like Ajax Calendar version 2 released' Add comment Bookmark 'Vista-like Ajax Calendar version 2 released' Bookmark Permalink to 'Vista-like Ajax Calendar version 2 released' Permalink
Bookmark 'Vista-like Ajax Calendar version 2 released' to Netvouz Bookmark 'Vista-like Ajax Calendar version 2 released' to Facebook Bookmark 'Vista-like Ajax Calendar version 2 released' to Furl Bookmark 'Vista-like Ajax Calendar version 2 released' to Technorati Bookmark 'Vista-like Ajax Calendar version 2 released' to Stumble Upon Bookmark 'Vista-like Ajax Calendar version 2 released' to Digg Bookmark 'Vista-like Ajax Calendar version 2 released' to Del.icio.us

Comments (57)

Comment author h-a-r-v Comment author email h-a-r-v<at>o2.pl Time May 7, 2008 08:08 GMT #1
My intuition told me to visit your site and voila! :) Looks like great work on demos. I guess I'll use the pickers as well now. Gonna report you if I find something improper, but my impression is you've taken care of everything. Catch ya later!
Comment author OrangeDes. Time May 22, 2008 09:28 GMT #2
Cool! Thanks.
Comment author Jordy Time May 28, 2008 02:29 GMT #3
Looks great, works great, i realy wan't to put it in my websites!
But there's a problem, i use the new beta (1.2beta2) from mootools, which has a lot of improvements.
Sadly this calendat isn't compatible with this version of mootools, even with mootools own compatibility mode turned on.
I tried to adapt yout code to work with 1.2, but failed :(

Any change there will be a update in your marvilous tool?
Comment author rcz Time May 29, 2008 10:27 GMT #4
I tried to adapt yout code to work with 1.2, but failed :(
Any change there will be a update in your marvilous tool?

If 1.2 comes out of beta stage I will make the calendar compatible.

Thanks for your comments!
Comment author Frozensolid Time May 30, 2008 01:53 GMT #5
Cant believe you made this yourself nooblet hehe,

Awesome stuff mate :)
Comment author matt Comment author email stugs<at>stugs.com Time Jun 1, 2008 12:36 GMT #6
Great script!

I'd like to use it in an application I'm building and wanted to know if you'd consider granting commercial permission for my app.

thanks,
Comment author Zvijer Comment author email leljakt<at>warmmail.com Time Jun 1, 2008 09:02 GMT #7
the best calendar i have ever seen, gr8 job there, but pity it wont work with mootools 1.2, cant w8 for for compatible version
Comment author rcz Time Jun 4, 2008 03:04 GMT #8
Added mootools 1.2 beta2 compatibility due to high demand Face: Happy!
Comment author Lewis Time Jun 7, 2008 01:09 GMT #9
It's an amazing calendar, but why make it use AJAX? It just seems pointless to me as Javascript can easily perform the same functions.

I'm pedantic about stupid things like this so I may just have to rewrite it to use pure Javascript Face: Happy
Comment author Martin Time Jun 7, 2008 01:05 GMT #10
With witch version of Opera have you tested?

With Opera 9.5 it works fine, but Opera 2.6 / 2.7 dosen't work :(

The frame shows up but it's empty

http://b.imagehost.org/0115/Zwischenablage02.jpg
Comment author rcz Time Jun 7, 2008 02:30 GMT #11
It's an amazing calendar, but why make it use AJAX? It just seems pointless to me as Javascript can easily perform the same functions.

I'm pedantic about stupid things like this so I may just have to rewrite it to use pure Javascript
You're quite right. The initial calendar was developed for use with database data.
The datepicker is just extra functionality to that initial version. Perhaps I'll make it clientside only once.
Comment author rcz Time Jun 7, 2008 03:06 GMT #12
With witch version of Opera have you tested?

With Opera 9.5 it works fine, but Opera 2.6 / 2.7 dosen't work :(
I've tested it on my local machine with Opera 9.27, which worked fine. The online version with Opera 9.27 (the same code as the local version) doesn't work.

Thanks for reporting that, I'll look into it.

-update-
This site uses a HTML base tag and it seems that Opera 9.27 doesn't use this base information inside external javascript files (so with url rewriting it tries to access a non existing path). There is nothing wrong with the vlaCalendar script, just had to provide the absolute filepath to go around that bug. The examples are working now for Opera 9.27 .
Comment author Martin Time Jun 7, 2008 11:47 GMT #13
Thank you!
Comment author tryer Time Jun 8, 2008 12:09 GMT #14
when i type 1970 in textbox calendar show 2010. Firefox 3, windows xp.
Comment author rcz Time Jun 9, 2008 12:39 GMT #15
when i type 1970 in textbox calendar show 2010. Firefox 3, windows xp.
The datepicker does not use on the textbox data.
The initial view of the datepicker is the current month. Would be nice as a new feature.
Comment author Jordy Time Jun 11, 2008 04:32 GMT #16
Sorry for bugging you again. First of all, i like to thank you for the 1.2b2 version i asked you about earlier.
Yesterday mootools released version 1.2, so that was a great moment to try this datepicker in my site.

When i replace the 1.2b2 version with the official release however, i get a error in Firebug on line 85 (uncompressed) of vlaCal-v2.js:

  1. element.setHTML is not a function
  2. [Break on this error] element.setHTML(data)

Do you know why? Thanx!
Comment author rcz Time Jun 11, 2008 07:08 GMT #17
Yeah, the 1.2b2 version is not compatible with 1.2.

I'm working on a compatible version Face: Glasses
Comment author dede urus Time Jun 13, 2008 04:50 GMT #18
First thanks for this great stuff.

A question from a noob:
Is there a way to disable past dates in the picker, so they cannot be selected?

Thanks again
Comment author weblizzer Comment author email weblizzer<at>yahoo.com Time Jun 13, 2008 08:17 GMT #19
Hi, i guess mootools had just release the stable version of 1.2 framework... i recently work on the beta version but it seems that the new version has just release so i will be replacing my library... hopefully your calendar would be compatible on the new version. and that would be great, such a great job ;)
Comment author Antoine Nicolas Time Jun 16, 2008 11:36 GMT #20
Is it possible to define which view appear first, I mean by view : decade, year and month ?
Comment author rcz Time Jun 16, 2008 04:50 GMT #21
Is it possible to define which view appear first, I mean by view : decade, year and month?

Not via the js class initialization properties. Sounds like a new feature in the next version.

You can however hard code it in inc/base.php:

Change
  1. <?php include "month.php"; ?>
in
  1. <?php $_POST["ts"] = time(); include "year.php"; ?>
or
  1. <?php $_POST["ts"] = time(); include "decade.php"; ?>
Comment author idiote Time Jun 18, 2008 07:04 GMT #22
sample code:

  1. <html>
  2. <head>
  3. <script type="text/javascript" src="js/mootools-release-v1.11.js"></script>
  4. <script type="text/javascript" src="js/vlaCal-v2.js"></script>
  5. <link type="text/css" media="screen" href="style/vlaCal-v2.css" rel="stylesheet" />
  6. </head>
  7.  
  8. <script type="text/javascript">
  9.     window.addEvent('domready', function() {
  10.     new vlaDatePicker('exampleI');
  11. </script>
  12.  
  13. </head>
  14. <body>
  15.  
  16. <input id="exampleI" type="text" style="width: 80px;" maxlength="10" />
  17.  
  18. </body>
  19. </html>

Can someone give me the clue, i'm completely noob. That's simple code doesn't work on me..

Any help...
Comment author rcz Time Jun 18, 2008 12:01 GMT #23
Can someone give me the clue, i'm completely noob. That's simple code doesn't work on me..

Learn some basics of HTML. A HTML page cannot have multitple head nodes, nor can it contain unclosed or unopened elements.

Your code should look like this:
  1. <html>
  2.     <head>
  3.         <script type="text/javascript" src="js/mootools-release-v1.11.js"></script>
  4.         <script type="text/javascript" src="js/vlaCal-v2.js"></script>
  5.         <link type="text/css" media="screen" href="style/vlaCal-v2.css" rel="stylesheet" />
  6.         <script type="text/javascript">
  7.             window.addEvent('domready', function() {
  8.                     new vlaDatePicker('exampleI');
  9.             });
  10.         </script>
  11.     </head>
  12.     <body>
  13.         <input id="exampleI" type="text" style="width: 80px;" maxlength="10" />
  14.     </body>
  15. </html>
Comment author mootools_fan Time Jun 18, 2008 12:18 GMT #24
Hello,

I am working on a site wich will use a lot of mootools improuvement.

I have choosen your datepicker for my forms Face: Happy

do you know when your compatible version with v1.2 of mootools will be realeased?

Thanks for this fantastic toolFace: Glasses
Comment author rcz Time Jun 18, 2008 02:01 GMT #25
do you know when your compatible version with v1.2 of mootools will be realeased?
It's nearly done. Fixing some small bugs.

Thanks for the comments Face: Laughing
Comment author mootools_fan Time Jun 18, 2008 02:59 GMT #26
great Face: Wink

and thanks again
Comment author mootools_fan Time Jun 19, 2008 02:06 GMT #27
If you need a beta tester for this new realease: ask me Face: Happy
Comment author Pat Comment author email patrick<at>pabera.de Time Jun 19, 2008 02:50 GMT #28
hey,

your calendar is a great tool I am using now for my little website. i have got one question.
using php I am prefilling my input forms with a special date, for example a day in the past...

2008-03-12

if I now click on the input field to open your calendar (date picker!!), it shows the actual date (Today, "June 19th"!!), not the date specified in the input field. do you knwo what I mean. I have checked you js scripting yet. I am probably gonna extend your script one day, but this will take some time. maybe you have a quick idea how to realize this wish :)

thx anyway for your work!
greetz from germany
Comment author rcz Time Jun 19, 2008 10:10 GMT #29
if I now click on the input field to open your calendar (date picker!!), [...] have a quick idea how to realize this wish :)
That feature has been requested before. I'll try to add the feature to the new 1.2 compatible release Face: Happy
Comment author mootools_fan Time Jun 20, 2008 12:06 GMT #30
Have you got an idear of when it will be realeased? Face: Devil Grin
Comment author Jesper Laursen Comment author website lauer.dk Time Jun 24, 2008 12:45 GMT #31
Hey, Thanks for the cool calendar :)
Just one question. I want to add a event to the calendar element on change, but it does only work when I manualy enter some text into the field, and not when the calendarpicker are used.
Can you give me a reason why?
Comment author alin Comment author email alin.ciaia<at>yahoo.com Time Jun 24, 2008 03:02 GMT #32
Hi,
I was looking if it is possible to limit the selecting for a date period, other dates to be disabled from selecting, thanks!
Comment author Jesper Laursen Comment author website lauer.dk Time Jun 24, 2008 05:55 GMT #33
It could also be nice to have an easy way to preset the date.
Comment author Adrian Hodge Comment author website www.adrianhodge.com Time Jul 6, 2008 03:04 GMT #34
I'd also be interested in using this once you have it working on the 1.2 release. How is the update going?
Comment author rcz Time Jul 6, 2008 12:53 GMT #35
I'd also be interested in using this once you have it working on the 1.2 release. How is the update going?

It's already released Face: Happy
Comment author Richard Castera Comment author website www.richardcastera.com Time Jul 6, 2008 04:24 GMT #36
Great tool! You have been featured on Richard Castera
Comment author Robert Comment author email robert<at>braincache.net Time Jul 7, 2008 04:50 GMT #37
Great tool, I love the demos, but another noob question...
I have this code in a test page ...
<html>
<head>
<script type="text/javascript" src="js/jslib/mootools-1.2-core.js"></script>
<script type="text/javascript" src="js/jslib/vlaCal-v2.1.js"></script>
<link type="text/css" media="screen" href="js/style/vlaCal-v2.1-apple_widget.css" rel="stylesheet" />
<script type="text/javascript">
window.addEvent('domready', function() {
new vlaDatePicker('exampleI');
});
</script>
</head>
<body>
<input id="exampleI" type="text" style="width: 80px;" maxlength="10" />
</body>
</html>

And i get this error ....
Error: this.arrowLeft has no properties
Source File: http://..../js/jslib/vlaCal-v2.1.js
Line: 144

On another page, wich has some other DOM stuff in the head i get a strange mootools error....
Error: $.element is not a function
Source File: http://.../js/jslib/mootools-1.2-core.js
Line: 1205

Any ideea anyone ?
Comment author rcz Time Jul 7, 2008 06:25 GMT #38
Get Firefox with the Firebug add-on and check if the Ajax calls (console tab) return correct HTML snippets. If it can't find the left arrow it means the HTML is not loaded properly. I guess the paths are not correct, you don't run PHP or PHP gives some kind of error.

By the way: you need to include styles/vlaCal-v2.css also because this contains the basic styling data. The alternative styles are made on top of the basic style.
Comment author Robert Comment author email robert<at>braincache.net Time Jul 8, 2008 09:44 GMT #39
thanks for the ideeas, I've managed to fix it, actually I had to adapt some of the old js to mootools, it's working perfectly now.

I'm having another problem with filling the date I have stored in a mysql db, I mean the script overwrites the date i've filled in with php, with the current date.
Comment author rcz Time Jul 9, 2008 11:07 GMT #40
Check the options. You can set prefillDate to false. Better is to provide your stored date with the script by providing the following object.
  1. prefillDate: { day: 12, month: 12, year: 2012 }

See Example VII.
Comment author Ramin Comment author website www.cic-1.com Time Jul 11, 2008 08:25 GMT #41
Richard, good clean work. I love the presetation too. I have a few questions:

1. Does/Will it support time picker too?

2. I use Java/Struts/Tiles. The main template has the header for all pages/tiles. Can I put the domready event handler in the body area for each input id that is needed?
Comment author rcz Time Jul 17, 2008 11:13 GMT #42
Richard, good clean work. I love the presetation too. I have a few questions:
1. Does/Will it support time picker too?
2. I use Java/Struts/Tiles. The main template has the header for all pages/tiles. Can I put the domready event handler in the body area for each input id that is needed?
Name is Rick btw Face: Laughing

Your questions:
1. Could make an extension for that.
2. For what I know the domready event needs to be in the head. Check it with mootools. 'm not familiar with Java/Struts/Tiles; remember that PHP is required for the vlaCalendar. A PHP-less clientside plugin is on the way.
Comment author Ryan Comment author email Ryan.Lovelett<at>gmail.com Time Jul 18, 2008 01:12 GMT #43
Little bug post...

If you have a layout that specifies a font-weight in a class above your picker you picker will also have that format, so you need to explicitly define it. Also, if the line-height is specified outside wrong you can have it overflow outside the image background. I added this to the class shown and the problem was solved. Just thought I'd pass it along.

Thanks for a great component!

.vlaCalendarPicker {
font-weight: normal;
line-height: 15px;
}
Comment author Ramin Time Jul 18, 2008 11:29 GMT #44
Could make an extension for that.
Please make the extension for a date/time picker.

...PHP-less client...
I don't wanna use PHP on server or client, so I'm looking forward to your PHP-less version.
Comment author bassiebas Time Jul 25, 2008 10:11 GMT #45
I can't use this script without php. this sucks...
Comment author Killtek Time Jul 28, 2008 06:47 GMT #46
A PHP-less version would be appreciated. Face: Happy
Comment author chicago Comment author website siliconloop.blogspot.com Time Jul 31, 2008 02:32 GMT #47
It doesn't seem like a good idea to take a client side widget and have it dependent on using a specific server side language.

It looks very nice though, except for the PHP bit....
Comment author raj Comment author email planpefect.bsp<at>gmail.com Time Aug 3, 2008 08:20 GMT #48


i am intested in date picker exmple III in this site
how to use this code
ppl could any one tell

help me out
Comment author Rory Comment author email rory.cartmell<at>gmail.com Time Aug 12, 2008 02:32 GMT #49
Just thought you'd like to know that when you download the package and copy the code of your website the javascript files link to the directory inc instead of where they are which is jslib.

Anyway, thanks for an awesome tool
Comment author Regnareb Comment author website silence.regnareb.com Time Aug 13, 2008 07:08 GMT #50
Don't work with Javascript disabled.
Comment author Taylor Cullen Time Aug 14, 2008 12:43 GMT #51
^ Funny that... why would a javascript based calender not work when javascript is disabled?... hmmm... let me think.
Comment author Lauer Time Aug 23, 2008 03:13 GMT #52
How can I secure that the calendar will be in a higher layer than select-boxes?

Can I in someway hide the selectboxes when the calendar is showed?
Comment author rcz Time Aug 23, 2008 09:12 GMT #53
How can I secure that the calendar will be in a higher layer than select-boxes? Can I in someway hide the selectboxes when the calendar is showed?
Nope, that is a IE6 bug.
Comment author manik Comment author email manik.cze<at>gmail.com Time Aug 26, 2008 09:58 GMT #54
Hi, this tool is exactly what I've been looking for. It has
- normal/datepicker possibility
- nice appereance
- and loading dates from PHP !

but unfortunately I cant get it working, i tried on localhost and web, too.

The paths are all right (I hope), but still I cant get any popup.
(and it throws me no errors...like it isnt activated at all:( )

Can anyone help me please?

The test-page is at: http://airsoft-mnisek.ic.cz/cal.html.
The files are in folder js/calendar/

Thanks for any advice.
Comment author rcz Time Sep 5, 2008 05:43 GMT #55
Hi, this tool is exactly what I've been looking for. It has
- normal/datepicker possibility
- nice appereance
- and loading dates from PHP !

[..]

The test-page is at: http://airsoft-mnisek.ic.cz/cal.html.
The files are in folder js/calendar/

Thanks for any advice.

I do get errors with FireFox and the Firebug plugin; you didn't include mootools-1.2-core correctly (you miss the .js).
Comment author manik Time Sep 6, 2008 07:45 GMT #56
Oh no, such a silly mistake :-/
Thx very much :)

Now its working great!
Comment author manik Time Sep 6, 2008 08:34 GMT #57
And is it possible to leave the input field empty?
The default behaviour is to fill in the actual date, or there is prefillDate option...

I have the date input as optional value...

Add comment

Your name
Your email or website (optional)
Icon
Confirmation code
Confirmation code
Message
face:happy face:glasses face:devilgrin face:crying face:grin face:laughing face:sad face:kiss face:shocked face:wink face:monkey face:angel