Calendar Control - Single-Select Implementation : Calendar « GUI Components « JavaScript DHTML

JavaScript DHTML
1. Ajax Layer
2. Data Type
3. Date Time
4. Development
5. Document
6. Dojo toolkit
7. Event
8. Event onMethod
9. Ext JS
10. Form Control
11. GUI Components
12. HTML
13. Javascript Collections
14. Javascript Objects
15. Javascript Properties
16. jQuery
17. Language Basics
18. Mochkit
19. Mootools
20. Node Operation
21. Object Oriented
22. Page Components
23. Rico
24. Scriptaculous
25. Security
26. SmartClient
27. Style Layout
28. Table
29. Utilities
30. Window Browser
31. YUI Library
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
JavaScript DHTML » GUI Components » Calendar 
Calendar Control - Single-Select Implementation
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

  <title>Yahoo! Calendar Control - Single-Select Implementation</title>
  

  <link rel="stylesheet" href="./examples/calendar/css/examples.css" type="text/css">
  
  <script type="text/javascript" src="./build/yahoo/yahoo.js"></script>
  <script type="text/javascript" src="./build/event/event.js" ></script>
  <script type="text/javascript" src="./build/dom/dom.js" ></script>

  <link type="text/css" rel="stylesheet" href="./build/fonts/fonts.css">
  <link type="text/css" rel="stylesheet" href="./build/reset/reset.css">  

  <script type="text/javascript" src="./build/calendar/calendar.js"></script>
  <link type="text/css" rel="stylesheet" href="./build/calendar/assets/calendar.css">  

  <link rel="stylesheet" type="text/css" href="./docs/assets/dpSyntaxHighlighter.css" />
  
  <script language="javascript">
    YAHOO.namespace("example.calendar");

    function init() {
      YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar("YAHOO.example.calendar.cal1","cal1Container");
      YAHOO.example.calendar.cal1.render();
    }

    YAHOO.util.Event.addListener(window, "load", init);
  </script>

</head>

<body>
  <div id="pageTitle">
    <h3>Calendar Control</h3>
  </div>

  <div class="column left">
    <h4>Default Single-Select Implementation</h4>

    <p>The default Calendar implementation is a single-select 1-up calendar view that defaults to the current month and year. The basic calendar can be implemented by declaring a variable to represent the calendar, and passing the calendar's ID to the Calendar constructor:</p>
<textarea name="code" class="JScript" cols="60" rows="1">
var cal1;
function init() {
   cal1 = new YAHOO.widget.Calendar("cal1""cal1Container");
   cal1.render();
}
</textarea>
    <p>The Calendar object should be instantiated after the body has been rendered, so that a reference to the container element that will contain the calendar can be obtained. The container element can reside anywhere within the body.</p>
<textarea name="code" class="HTML" cols="60" rows="1">
<div id="cal1Container"></div>
</textarea>

    </div>
    
    <div class="column right">
      <div style="margin-left:auto;margin-right:auto;width:150px">
      <div id="cal1Container"></div>
      <div style="margin-left:auto;margin-right:auto;text-align:center;width:150px;clear:both">
        <a href="javascript:YAHOO.example.calendar.cal1.reset()" class="navLink" style="font-size:12px;text-decoration:underline">reset</a>|
        <a href="javascript:alert(YAHOO.example.calendar.cal1.getSelectedDates())" class="navLink" style="font-size:12px;text-decoration:underline">what's selected?</a>
      </div>
    </div>
  </div>

<script src="./docs/assets/dpSyntaxHighlighter.js"></script>
<script language="javascript"
dp.SyntaxHighlighter.HighlightAll('code'); 
</script>

</body>
</html>

           
         
  
yui.zip( 3,714 k)
Related examples in the same category
1. HTML Calendar based on DynAPI
2. JavaScript Date Picker based on ComboBox
3. Calendar Control - 2-Up Implementation
4. Calendar Control - Handling onSelect / onDeselect
5. Calendar Control - Mix/Max Implementation
6. Calendar Control - Multi-Select Implementation
7. Calendar Control - Multi-Select 2-up Implementation
8. Calendar Control - Custom Renderer Example (Holiday Renderer Implementation)
9. Calendar Control - Date Restriction Example (Date Restriction Implementation)
10. Calendar Control - Row Highlight Example (Row Highlight Implementation)
11. Popup calendar
12. Month Calendar
13. Popup Calendar for a textfield
14. Multiselection Calendar
15. Free Date Picker : An easy plugin to add a date picker (calendar) in your web site
16. HTML Date Picker
17. Date Picker in new window
18. All browser Calendar
19. DHTML Calendar for the impatient
20. Calendar: special day
21. Calendar: day info
22. Calendar: Multiple day selection
23. Calendar with different theme
24. Calendar with image for each month
25. Fancy Calendar
26. Another Calendar
27. Date Time Picker
28. Month Calendar (2)
29. Building a Calculator
30. A Dynamic Calendar Table
31. Dynamic HTML Calendar
32.  A Static Calendar by JavaScript
33. Displaying the Calendar
34. Calendar (IE only)
35. Calendar in slide tab
36. Another DHTML Calendar
37. Event Calendar
38. Open calendar
39. swazz calendar 1.0
40. jquery calendar
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.