Released 7 years ago , Last update 7 years ago

The Calendar widget is a JavaScript-based calendar that can either be embedded within a page or popup when a trigger element is clicked.

  • Developed with CSS in Mind
    In CalendarView you will find no embedded style or presentation. You are encouraged to make it look how you want it to look so that it looks like it belongs in your project.

  • Embedded or Popup "” You Decide!
    CalendarView can be either embedded into your page or used as a pop-up. The choice is yours!

  • Lightweight and Easy to Use
    Frustrated with the complexity and bloatedness of existing calendars, CalendarView was implemented as a lightweight alternative.

  • Utilizes the Prototype Framework
    CalendarView uses the Prototype JavaScript framework, lessening the overall JavaScript impact if Prototype is already being used in your project.

  • 5 3
  • 4 0
  • 3 0
  • 2 0
  • 1 0
3 Reviews Read Reviews


14 day 14-day money-back guarantee



The GNU LGPL is an open-source license.

Usage Instructions



An HTML element (or DOM ID) that will be updated when a date is selected. Can be an INPUT field or any other JavaScript object that has either innerHTML or value attributes. The value of this field will also be parsed for setting the current date when the Calendar is initialized.


An HTML element (or DOM ID) that will be observed for clicks to display a popup calendar. If a triggerElement is not specified, the dateField will be observed instead.


An HTML element (or DOM ID) that will receive the initialized embedded calendar.


JavaScript function that will be called when a date is selected. Only define this if you want to override the default behavior.


JavaScript function that will be called when the calendar should be closed (either after a selection has been made or if the user clicked outside of the calendar's container element). This only applies to popup calendars and should only be defined if you want to override the default behavior.


Setting up an Embedded Calendar

Embedded calendars require a parent element so that it can be appended to the DOM, such as a div element.

Embedded Calendar Example

          <script type="text/javascript" src="prototype.js"></script>
          <script type="text/javascript" src="calendarview.js"></script>
          <script type="text/javascript"><br />      window.onload = function() {        
                          dateField     : 'date',
                          parentElement : 'calendar'        
         <div id="calendar"></div>
         <div id="date">Select Date</div>
    <script type="text/javascript">if(!NREUMQ.f){NREUMQ.f=function(){NREUMQ.push(["load",new Date().getTime()]);var e=document.createElement("script");e.type="text/javascript";e.async=true;e.src="";document.body.appendChild(e);if(NREUMQ.a)NREUMQ.a();};NREUMQ.a=window.onload;window.onload=NREUMQ.f;};NREUMQ.push(["nrf2","","7d8608a34f",416164,"YFdVYEsAVxdYAhAICVkddldNCFYKFgUBFwNbXUdRS05aC1cVAQ8SGFdTXU0=",0,52,new Date().getTime()]);</script>

Setting up a Popup Calendar

Popup calendars require a trigger element that will display the calendar when clicked. By default, the element defined as the dateField will trigger the calendar if a triggerElement has not been specified.

Popup Calendar Example

        <script type="text/javascript" src="prototype.js"></script>
        <script type="text/javascript" src="calendarview.js"></script>
        <script type="text/javascript">
            window.onload = function() {
                    dateField      : 'date',
                    triggerElement : 'calendarButton'
        <input type="text" name="date" id="date" />
        <input type="button" id="calendarButton" value="Show Calendar" />

Styling the Calendar

The calendar is meant to be styled entirely with CSS. A few CSS classes are declared in the HTML output to assist in styling, but for the most part it should be styled with standard CSS element selectors.

Example HTML Output

<div class="calendar popup">  
                <td class="title" colspan="7">March 2007</td>      
                <td class="button">«</td>        
                <td class="button">‹</td>        
                <td class="button" colspan="3">Today</td>        
                <td class="button">›</td>        
                <td class="button">»</td>      
                <th class="weekend">S</th>        
                <th class="weekend">S</th>      
            <tr class="days">        
                <td class="otherDay weekend">25</td>        
                <td class="otherDay">26</td>        
                <td class="otherDay">27</td>        
                <td class="otherDay">28</td>        
                <td class=" weekend">3</td>      
            <tr class="days">        
                <td class="weekend">4</td>        
                <td class="selected">6</td>        
                <td class="weekend">10</td>      
            <tr class="days">        
                <td class="weekend">11</td>        
                <td class="today">12</td>        
                <td class="weekend">17</td>      
            <tr class="days">        
                <td class="weekend">18</td>        
                <td class="weekend">24</td>      
            <tr class="days">        
                <td class="weekend">25</td>        
                <td class="weekend">31</td>      
License » GNU LGPL Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.

Or enter your name and Email
  • S Sandie 7 years ago
    Is there an easy way to change the date output format? eg: rather than getting back 2011-08-15 I'd rather have my format something like 15/08/11