Walk you through the steps needed to get a default Calendar up and running. : Calendar « YUI Library « JavaScript DHTML






Walk you through the steps needed to get a default Calendar up and running.

 


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>


    <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Quickstart Tutorial</title>

<style type="text/css">
/*margin and padding on body element
  can introduce errors in determining
  element position and are not recommended;
  we turn them off as a foundation for YUI
  CSS treatments. */
body {
  margin:0;
  padding:0;
}
</style>

<link rel="stylesheet" type="text/css" href="yui_2.7.0b-lib/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="yui_2.7.0b-lib/calendar/assets/skins/sam/calendar.css" />
<script type="text/javascript" src="yui_2.7.0b-lib/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="yui_2.7.0b-lib/calendar/calendar-min.js"></script>

<!--there is no custom header content for this example-->

</head>

<body class=" yui-skin-sam">


<h1>Quickstart Tutorial</h1>

<div class="exampleIntro">
  <p>This basic example walks you through the steps needed to get a default Calendar up and running. It covers the set of file dependencies which need to be included as well as the basic markup and JS code required to get you started.</p>
      
</div>

<!--BEGIN SOURCE CODE FOR EXAMPLE  -->

<div id="cal1Container"></div>

<script type="text/javascript">
  YAHOO.namespace("example.calendar");

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

  YAHOO.util.Event.onDOMReady(YAHOO.example.calendar.init);
</script>

<div style="clear:both" ></div>

<!--END SOURCE CODE FOR EXAMPLE  -->

</body>
</html>
<!-- presentbright.corp.yahoo.com uncompressed/chunked Thu Feb 19 10:53:07 PST 2009 -->

   
  








yui_2.7.0b.zip( 4,431 k)

Related examples in the same category

1.Handling Calendar Events
2.Calendar and Select Fields
3.Calendar and Text Fields
4.Calendar Localization - Germany
5.Calendar Localization - Japan
6.Calendar range: Minimum/Maximum Dates
7.Multi-Select Calendar
8.Interval Selection Calendar
9.Popup Calendar - Basic
10.Calendar employs a feature called the Render Stack to allow you to customize the way that certain date cells are rendered on the Calendar
11.Calendar control wrapped in a Container (a Dialog control in this case) allows you to leverage Container features to position the Calendar
12.The CalendarGroup control is a specialized version of the Calendar control which allows you to display multiple months (pages) together
13.Enable/configure Calendar Navigator and jump to a specific year/month without scrolling through months sequentially.
14.Calendar Menu Button with Date on Button Face