forked from kbwood/calendars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendarsBasic.html
58 lines (58 loc) · 2.9 KB
/
calendarsBasic.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
56
57
58
<!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>jQuery Calendars</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="jquery.calendars.js"></script>
<script type="text/javascript" src="jquery.calendars.plus.js"></script>
<script type="text/javascript" src="jquery.calendars.taiwan.js"></script>
<script type="text/javascript" src="jquery.calendars.thai.js"></script>
<script type="text/javascript" src="jquery.calendars.julian.js"></script>
<script type="text/javascript" src="jquery.calendars.persian.js"></script>
<script type="text/javascript" src="jquery.calendars.islamic.js"></script>
<script type="text/javascript" src="jquery.calendars.ummalqura.js"></script>
<script type="text/javascript" src="jquery.calendars.hebrew.js"></script>
<script type="text/javascript" src="jquery.calendars.coptic.js"></script>
<script type="text/javascript" src="jquery.calendars.ethiopian.js"></script>
<script type="text/javascript" src="jquery.calendars.nepali.js"></script>
<script type="text/javascript" src="jquery.calendars.mayan.js"></script>
<script type="text/javascript">
$(function() {
var calendar;
$('#calendar').change(function() {
calendar = $.calendars.instance($(this).val());
$('#default').text(calendar.local.dateFormat);
}).change();
$('#check').click(function() {
try {
var date = calendar.parseDate('', $('#input').val());
$('#output').val(calendar.formatDate($('#format').val(), date));
}
catch (e) {
alert(e);
}
});
});
</script>
</head>
<body>
<h1>jQuery Calendars</h1>
<p>This page demonstrates the very basics of the
<a href="http://keith-wood.name/calendars.html">jQuery Calendars plugin</a>.
It contains the minimum requirements for using the plugin and
can be used as the basis for your own experimentation.</p>
<p>For more detail see the <a href="http://keith-wood.name/calendarsRef.html">documentation reference</a> page.</p>
<p>Select a calendar: <select id="calendar">
<option value="gregorian">Gregorian</option><option value="taiwan">Taiwan</option>
<option value="thai">Thai</option><option value="julian">Julian</option>
<option value="persian">Persian</option><option value="islamic">Islamic</option>
<option value="ummalqura">Umm al-Qura</option><option value="hebrew">Hebrew</option>
<option value="coptic">Coptic</option><option value="ethiopian">Ethiopian</option>
<option value="nepali">Nepali</option><option value="mayan">Mayan</option></select></p>
<p>Enter a date: <input type="text" id="input" value="01/26/2009"> (<span id="default"></span>)</p>
<p>Check and format: <input type="text" id="format" value="DD, MM d, yyyy">
<button type="button" id="check">Format</button></p>
<p>Result: <input type="text" id="output" size="40" readonly></p>
</body>
</html>