-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyui.calendar.html
55 lines (50 loc) · 2.3 KB
/
yui.calendar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>YUI Calendar Widget</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<!-- Combo-handled YUI CSS files: -->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/combo?2.8.1/build/button/assets/skins/sam/button.css&2.8.1/build/calendar/assets/skins/sam/calendar.css">
<!-- Combo-handled YUI JS files: -->
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.8.1/build/yahoo-dom-event/yahoo-dom-event.js&2.8.1/build/selector/selector-min.js&2.8.1/build/event-delegate/event-delegate-min.js&2.8.1/build/element/element-min.js&2.8.1/build/button/button-min.js&2.8.1/build/calendar/calendar-min.js"></script>
<!-- YUI wrapper CSS and JS files -->
<link rel="stylesheet" type="text/css" href="yui.styles.css">
<script type="text/javascript" src="yui.calendar.js"></script>
<script type="text/javascript" src="yui.utilities.js"></script>
<script type="text/javascript">
var yuiConfig = {
calendar: {
title: 'Select a date:',
close: true,
navigator: true,
dateFormat: 'YYYY-MM-DD'
}
};
// Initialize calendar widgets
YAHOO.util.Event.onAvailable('form_example', YuiCalendar.initialize, true);
// Initialize buttons
YAHOO.util.Event.onContentReady('form_example', function () {
var oBtn = new YAHOO.widget.Button('choose_date1');
var oAddAnother = new YAHOO.widget.Button('add');
});
// Initialize the add widget button
YAHOO.util.Event.on('add-button', 'click', function(e) {
YuiUtilties.cloneElement('example1');
});
</script>
</head>
<body class="yui-skin-sam">
<form action="#" id="form_example">
<div id="example1" class="container">
<label for="date_field1">Date</label>
<input type="text" name="date_field1" id="date_field1">
<div id="btn_container1" class="btn_container inline">
<button type="button" id="choose_date1" name="button1" value="choose">choose</button>
</div>
</div>
</form>
<div class="yui-utilities">
<button type="button" id="add" name="add" value="Add Date Field">Add Date Field</button>
</div>
</body>
</html>