PageSourceSearch

https://www.cmu.ca/js/datetimepick.js

js cmu.ca collected 2026-10-01 13:14:27 UTC 4,091 bytes, 150 lines download raw bytes

1$(function() {
2    $('.datetimepick').datetimepicker({
3		dateFormat: 'yy-mm-dd',
4		hour: 00,
5		minute: 00,
6		changeMonth: true,
7		changeYear: true,
8		minDate: "-70Y",
9		maxDate: "-16Y",
10		onChangeMonthYear: function (year, month, day) {
11			$(this).datetimepicker('setDate', new Date(year, month - 1, day.selectedDay));
12        }
13	});
14});
15$(function() {
16    $('.datetimecurrent').datetimepicker({
17		dateFormat: 'yy-mm-dd',
18		hour: 00,
19		minute: 00,
20		changeMonth: true,
21		changeYear: true,
22		minDate: "-1D",
23		maxDate: "+150D",
24		onChangeMonthYear: function (year, month, day) {
25			$(this).datetimepicker('setDate', new Date(year, month - 1, day.selectedDay));
26        }
27	});
28});
29$(function() {
30    $('.datetimecms').datetimepicker({
31		dateFormat: 'yy-mm-dd',
32		hour: 00,
33		minute: 00,
34		changeMonth: true,
35		changeYear: true,
36		yearRange: "2012:2035",
37		onChangeMonthYear: function (year, month, day) {
38			$(this).datetimepicker('setDate', new Date(year, month - 1, day.selectedDay));
39        }
40	});
41});
42$(function() {
43    $('.datetimeampm').datetimepicker({
44		dateFormat: 'yy-mm-dd',
45		hour: 00,
46		minute: 00,
47		changeMonth: true,
48		changeYear: true,
49		ampm: true,
50		yearRange: "2012:2035",
51		onChangeMonthYear: function (year, month, day) {
52			$(this).datetimepicker('setDate', new Date(year, month - 1, day.selectedDay));
53        }
54	});
55});
56$(function() {
57    $('.datecms').datepicker({
58		dateFormat: 'yy-mm-dd',
59		changeMonth: true,
60		changeYear: true,
61		yearRange: "2012:2035",
62		onChangeMonthYear: function (year, month, day) {
63			$(this).datetimepicker('setDate', new Date(year, month - 1, day.selectedDay));
64        }
65	});
66});
67$(function() {
68    $('.birthdatepick').datepicker({
69		dateFormat: 'yy-mm-dd',
70		changeMonth: true,
71		changeYear: true,
72        yearRange: "1920:2057",
73		minDate: "-70Y",
74		maxDate: "-15Y",
75		//onChangeMonthYear: function (year, month, day) {
76		//	$(this).datepicker('setDate', new Date(year, month - 1, day.selectedDay));
77       // }
78	});
79	//queryDate = '';
80	//var parsedDate = $.datepicker.parseDate('yy-mm-dd', queryDate);
81	//$('.birthdatepick').datepicker('setDate', parsedDate);
82});
83$(function() {
84    $('.birthdategen').datepicker({
85      dateFormat: 'yy-mm-dd',
86        changeMonth: true,
87        changeYear: true,
88        yearRange: "1920:2057",
89		minDate: "-90Y",
90		maxDate: "-30D",
91        //onChangeMonthYear: function (year, month, day) {
92            //$(this).datepicker('setDate', new Date(year, month - 1, day.selectedDay));
93        //}
94    });
95});
96$(function() {
97    $('.birthdateyouth').datepicker({
98      dateFormat: 'yy-mm-dd',
99        changeMonth: true,
100        changeYear: true,
101		minDate: "-19Y",
102		maxDate: "-8Y",
103        //onChangeMonthYear: function (year, month, day) {
104            //$(this).datepicker('setDate', new Date(year, month - 1, day.selectedDay));
105        //}
106    });
107});
108$(function() {
109    $('.datepick').datepicker({
110		dateFormat: 'yy-mm-dd',
111		changeMonth: true,
112		changeYear: true,
113		minDate: "-15D",
114		maxDate: "+20Y",
115		onChangeMonthYear: function (year, month, day) {
116            $(this).datepicker('setDate', new Date(year, month - 1, day.selectedDay));
117        }
118	});
119	var today = new Date();
120	var dd = today.getDate();
121	var mm = today.getMonth()+1; //January is 0!
122	var yyyy = today.getFullYear();
123	if (dd<10) {
124		dd='0'+dd;
125	}
126	if (mm<10) {
127		mm = '0' + mm;
128	}
129	var today = yyyy + '-' + mm+ '-' + dd;
130	var parsedDate = $.datepicker.parseDate('yy-mm-dd', today);
131	$('.datepick').datepicker('setDate', parsedDate);
132});
133$(function() {
134    $('.datepicknew').datepicker({
135		dateFormat: 'yy-mm-dd',
136		changeMonth: true,
137		changeYear: true,
138		minDate: "-15D",
139		maxDate: "+20Y",
140		onChangeMonthYear: function (year, month, day) {
141			$(this).datepicker('setDate', new Date(year, month - 1, day.selectedDay));
142        }
143	});
144});
145
146function autotab(current,to){
147    if (current.getAttribute && current.value.length==current.getAttribute("maxlength")) {
148		to.focus();
149	}
150}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.