generated from dr-btd-student/p3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatepicker.html
More file actions
42 lines (40 loc) · 1.29 KB
/
datepicker.html
File metadata and controls
42 lines (40 loc) · 1.29 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Project 3, Problem 1</title>
<link rel="stylesheet" type="text/css" href="datepicker.css" />
</head>
<body>
<h1>First DatePicker</h1>
<div id="datepicker1"></div>
<h1>Second DatePicker</h1>
<div id="datepicker2"></div>
<script type="text/javascript" src="DatePicker.js"></script>
<script type="text/javascript">
// <![CDATA[
'use strict';
/* global DatePicker */
var datePicker1 = new DatePicker('datepicker1', function (id, fixedDate) {
console.log(
'DatePicker with id',
id,
'selected date:',
fixedDate.month + '/' + fixedDate.day + '/' + fixedDate.year,
);
});
datePicker1.render(new Date());
var datePicker2 = new DatePicker('datepicker2', function (id, fixedDate) {
console.log(
'DatePicker with id',
id,
'selected date:',
fixedDate.month + '/' + fixedDate.day + '/' + fixedDate.year,
);
});
datePicker2.render(new Date('1/1/2009'));
// ]]>
</script>
</body>
</html>