PageSourceSearch

https://servitaxitenesur.com/js/jquery.datetimepicker.js

js servitaxitenesur.com collected 2026-10-04 22:39:41 UTC 90,722 bytes, 2,562 lines download raw bytes

vendor: 23,749 bytes, lines 1-554
1/**
2 * @preserve jQuery DateTimePicker
3 * @homepage http://xdsoft.net/jqplugins/datetimepicker/
4 * @author Chupurnov Valeriy (<[email protected]>)
5 */
6
7/**
8 * @param {jQuery} $
9 */
10var datetimepickerFactory = function ($) {
11	'use strict';
12
13	var default_options  = {
14		i18n: {
15			ar: { // Arabic
16				months: [
17					"كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
18				],
19				dayOfWeekShort: [
20					"ن", "ث", "ع", "خ", "ج", "س", "ح"
21				],
22				dayOfWeek: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"]
23			},
24			ro: { // Romanian
25				months: [
26					"Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
27				],
28				dayOfWeekShort: [
29					"Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"
30				],
31				dayOfWeek: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]
32			},
33			id: { // Indonesian
34				months: [
35					"Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
36				],
37				dayOfWeekShort: [
38					"Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"
39				],
40				dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
41			},
42			is: { // Icelandic
43				months: [
44					"Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"
45				],
46				dayOfWeekShort: [
47					"Sun", "Mán", "Þrið", "Mið", "Fim", "Fös", "Lau"
48				],
49				dayOfWeek: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"]
50			},
51			bg: { // Bulgarian
52				months: [
53					"Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
54				],
55				dayOfWeekShort: [
56					"Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
57				],
58				dayOfWeek: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
59			},
60			fa: { // Persian/Farsi
61				months: [
62					'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
63				],
64				dayOfWeekShort: [
65					'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
66				],
67				dayOfWeek: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"]
68			},
69			ru: { // Russian
70				months: [
71					'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
72				],
73				dayOfWeekShort: [
74					"Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
75				],
76				dayOfWeek: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]
77			},
78			uk: { // Ukrainian
79				months: [
80					'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
81				],
82				dayOfWeekShort: [
83					"Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
84				],
85				dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"]
86			},
87			en: { // English
88				months: [
89					"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
90				],
91				dayOfWeekShort: [
92					"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
93				],
94				dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
95			},
96			el: { // Ελληνικά
97				months: [
98					"Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
99				],
100				dayOfWeekShort: [
101					"Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
102				],
103				dayOfWeek: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]
104			},
105			de: { // German
106				months: [
107					'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
108				],
109				dayOfWeekShort: [
110					"So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
111				],
112				dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
113			},
114			nl: { // Dutch
115				months: [
116					"januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
117				],
118				dayOfWeekShort: [
119					"zo", "ma", "di", "wo", "do", "vr", "za"
120				],
121				dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]
122			},
123			tr: { // Turkish
124				months: [
125					"Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
126				],
127				dayOfWeekShort: [
128					"Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
129				],
130				dayOfWeek: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
131			},
132			fr: { //French
133				months: [
134					"Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
135				],
136				dayOfWeekShort: [
137					"Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
138				],
139				dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]
140			},
141			es: { // Spanish
142				months: [
143					"Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
144				],
145				dayOfWeekShort: [
146					"Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
147				],
148				dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]
149			},
150			th: { // Thai
151				months: [
152					'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
153				],
154				dayOfWeekShort: [
155					'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
156				],
157				dayOfWeek: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"]
158			},
159			pl: { // Polish
160				months: [
161					"styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
162				],
163				dayOfWeekShort: [
164					"nd", "pn", "wt", "śr", "cz", "pt", "sb"
165				],
166				dayOfWeek: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"]
167			},
168			pt: { // Portuguese
169				months: [
170					"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
171				],
172				dayOfWeekShort: [
173					"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
174				],
175				dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
176			},
177			ch: { // Simplified Chinese
178				months: [
179					"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
180				],
181				dayOfWeekShort: [
182					"日", "一", "二", "三", "四", "五", "六"
183				]
184			},
185			se: { // Swedish
186				months: [
187					"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September",  "Oktober", "November", "December"
188				],
189				dayOfWeekShort: [
190					"Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
191				]
192			},
193			km: { // Khmer (ភាសាខ្មែរ)
194				months: [
195					"មករា​", "កុម្ភៈ", "មិនា​", "មេសា​", "ឧសភា​", "មិថុនា​", "កក្កដា​", "សីហា​", "កញ្ញា​", "តុលា​", "វិច្ឆិកា", "ធ្នូ​"
196				],
197				dayOfWeekShort: ["អាទិ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហ​​", "សុក្រ​", "សៅរ៍"],
198				dayOfWeek: ["អាទិត្យ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហស្បតិ៍​", "សុក្រ​", "សៅរ៍"]
199			},
200			kr: { // Korean
201				months: [
202					"1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
203				],
204				dayOfWeekShort: [
205					"일", "월", "화", "수", "목", "금", "토"
206				],
207				dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
208			},
209			it: { // Italian
210				months: [
211					"Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
212				],
213				dayOfWeekShort: [
214					"Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
215				],
216				dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
217			},
218			da: { // Dansk
219				months: [
220					"Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
221				],
222				dayOfWeekShort: [
223					"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
224				],
225				dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]
226			},
227			no: { // Norwegian
228				months: [
229					"Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
230				],
231				dayOfWeekShort: [
232					"Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
233				],
234				dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag']
235			},
236			ja: { // Japanese
237				months: [
238					"1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
239				],
240				dayOfWeekShort: [
241					"日", "月", "火", "水", "木", "金", "土"
242				],
243				dayOfWeek: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"]
244			},
245			vi: { // Vietnamese
246				months: [
247					"Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
248				],
249				dayOfWeekShort: [
250					"CN", "T2", "T3", "T4", "T5", "T6", "T7"
251				],
252				dayOfWeek: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]
253			},
254			sl: { // Slovenščina
255				months: [
256					"Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
257				],
258				dayOfWeekShort: [
259					"Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
260				],
261				dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]
262			},
263			cs: { // Čeština
264				months: [
265					"Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
266				],
267				dayOfWeekShort: [
268					"Ne", "Po", "Út", "St", "Čt", "Pá", "So"
269				]
270			},
271			hu: { // Hungarian
272				months: [
273					"Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
274				],
275				dayOfWeekShort: [
276					"Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
277				],
278				dayOfWeek: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"]
279			},
280			az: { //Azerbaijanian (Azeri)
281				months: [
282					"Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
283				],
284				dayOfWeekShort: [
285					"B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
286				],
287				dayOfWeek: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"]
288			},
289			bs: { //Bosanski
290				months: [
291					"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
292				],
293				dayOfWeekShort: [
294					"Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
295				],
296				dayOfWeek: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
297			},
298			ca: { //Català
299				months: [
300					"Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
301				],
302				dayOfWeekShort: [
303					"Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
304				],
305				dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]
306			},
307			'en-GB': { //English (British)
308				months: [
309					"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
310				],
311				dayOfWeekShort: [
312					"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
313				],
314				dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
315			},
316			et: { //"Eesti"
317				months: [
318					"Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
319				],
320				dayOfWeekShort: [
321					"P", "E", "T", "K", "N", "R", "L"
322				],
323				dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"]
324			},
325			eu: { //Euskara
326				months: [
327					"Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
328				],
329				dayOfWeekShort: [
330					"Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
331				],
332				dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata']
333			},
334			fi: { //Finnish (Suomi)
335				months: [
336					"Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
337				],
338				dayOfWeekShort: [
339					"Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
340				],
341				dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]
342			},
343			gl: { //Galego
344				months: [
345					"Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
346				],
347				dayOfWeekShort: [
348					"Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
349				],
350				dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"]
351			},
352			hr: { //Hrvatski
353				months: [
354					"Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
355				],
356				dayOfWeekShort: [
357					"Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
358				],
359				dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
360			},
361			ko: { //Korean (한국어)
362				months: [
363					"1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
364				],
365				dayOfWeekShort: [
366					"일", "월", "화", "수", "목", "금", "토"
367				],
368				dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
369			},
370			lt: { //Lithuanian (lietuvių)
371				months: [
372					"Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
373				],
374				dayOfWeekShort: [
375					"Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
376				],
377				dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]
378			},
379			lv: { //Latvian (Latviešu)
380				months: [
381					"Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
382				],
383				dayOfWeekShort: [
384					"Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
385				],
386				dayOfWeek: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]
387			},
388			mk: { //Macedonian (Македонски)
389				months: [
390					"јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
391				],
392				dayOfWeekShort: [
393					"нед", "пон", "вто", "сре", "чет", "пет", "саб"
394				],
395				dayOfWeek: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]
396			},
397			mn: { //Mongolian (Монгол)
398				months: [
399					"1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
400				],
401				dayOfWeekShort: [
402					"Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
403				],
404				dayOfWeek: ["Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба", "Ням"]
405			},
406			'pt-BR': { //Português(Brasil)
407				months: [
408					"Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
409				],
410				dayOfWeekShort: [
411					"Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
412				],
413				dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
414			},
415			sk: { //Slovenčina
416				months: [
417					"Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
418				],
419				dayOfWeekShort: [
420					"Ne", "Po", "Ut", "St", "Å t", "Pi", "So"
421				],
422				dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]
423			},
424			sq: { //Albanian (Shqip)
425				months: [
426					"Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"
427				],
428				dayOfWeekShort: [
429					"Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"
430				],
431				dayOfWeek: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"]
432			},
433			'sr-YU': { //Serbian (Srpski)
434				months: [
435					"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
436				],
437				dayOfWeekShort: [
438					"Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
439				],
440				dayOfWeek: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]
441			},
442			sr: { //Serbian Cyrillic (Српски)
443				months: [
444					"јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
445				],
446				dayOfWeekShort: [
447					"нед", "пон", "уто", "сре", "чет", "пет", "суб"
448				],
449				dayOfWeek: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]
450			},
451			sv: { //Svenska
452				months: [
453					"Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
454				],
455				dayOfWeekShort: [
456					"Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
457				],
458				dayOfWeek: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"]
459			},
460			'zh-TW': { //Traditional Chinese (繁體中文)
461				months: [
462					"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
463				],
464				dayOfWeekShort: [
465					"日", "一", "二", "三", "四", "五", "六"
466				],
467				dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
468			},
469			zh: { //Simplified Chinese (简体中文)
470				months: [
471					"一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
472				],
473				dayOfWeekShort: [
474					"日", "一", "二", "三", "四", "五", "六"
475				],
476				dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
477			},
478			ug:{ // Uyghur(ئۇيغۇرچە)
479				months: [
480					"1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"
481				],
482				dayOfWeek: [
483					"يەكشەنبە", "دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"
484				]
485			},
486			he: { //Hebrew (עברית)
487				months: [
488					'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
489				],
490				dayOfWeekShort: [
491					'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
492				],
493				dayOfWeek: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"]
494			},
495			hy: { // Armenian
496				months: [
497					"Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
498				],
499				dayOfWeekShort: [
500					"Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
501				],
502				dayOfWeek: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"]
503			},
504			kg: { // Kyrgyz
505				months: [
506					'Үчтүн айы', 'Бирдин айы', 'Жалган Куран', 'Чын Куран', 'Бугу', 'Кулжа', 'Теке', 'Баш Оона', 'Аяк Оона', 'Тогуздун айы', 'Жетинин айы', 'Бештин айы'
507				],
508				dayOfWeekShort: [
509					"Жек", "Дүй", "Шей", "Шар", "Бей", "Жум", "Ише"
510				],
511				dayOfWeek: [
512					"Жекшемб", "Дүйшөмб", "Шейшемб", "Шаршемб", "Бейшемби", "Жума", "Ишенб"
513				]
514			},
515			rm: { // Romansh
516				months: [
517					"Schaner", "Favrer", "Mars", "Avrigl", "Matg", "Zercladur", "Fanadur", "Avust", "Settember", "October", "November", "December"
518				],
519				dayOfWeekShort: [
520					"Du", "Gli", "Ma", "Me", "Gie", "Ve", "So"
521				],
522				dayOfWeek: [
523					"Dumengia", "Glindesdi", "Mardi", "Mesemna", "Gievgia", "Venderdi", "Sonda"
524				]
525			},
526			ka: { // Georgian
527				months: [
528					'იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'
529				],
530				dayOfWeekShort: [
531					"კვ", "ორშ", "სამშ", "ოთხ", "ხუთ", "პარ", "შაბ"
532				],
533				dayOfWeek: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"]
534			}
535		},
536
537		ownerDocument: document,
538		contentWindow: window,
539
540		value: '',
541		rtl: false,
542
543		format:	'Y/m/d H:i',
544		formatTime:	'H:i',
545		formatDate:	'Y/m/d',
546
547		startDate:	false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
548		step: 60,
549		monthChangeSpinner: true,
550
551		closeOnDateSelect: false,
552		closeOnTimeSelect: true,
553		closeOnWithoutClick: true,
554		closeOnInputClick: true,
555		openOnFocus: true,
556
557		timepicker: true,
558		datepicker: true,
559		weeks: false,
560
561		defaultTime: false,	// use formatTime format (ex. '10:00' for formatTime:	'H:i')
562		defaultDate: false,	// use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
563
564		minDate: false,
565		maxDate: false,
566		minTime: false,
567		maxTime: false,
568        minDateTime: false,
569
570		disabledMinTime: false,
571		disabledMaxTime: false,
572
573		allowTimes: [],
574		opened: false,
575		initTime: true,
576		inline: false,
577		theme: '',
578		touchMovedThreshold: 5
vendor: 12,908 bytes, lines 578-1008
578,
579
580		onSelectDate: function () {},
581		onSelectTime: function () {},
582		onChangeMonth: function () {},
583		onGetWeekOfYear: function () {},
584		onChangeYear: function () {},
585		onChangeDateTime: function () {},
586		onShow: function () {},
587		onClose: function () {},
588		onGenerate: function () {},
589
590		withoutCopyright: true,
591		inverseButton: false,
592		hours12: false,
593		next: 'xdsoft_next',
594		prev : 'xdsoft_prev',
595		dayOfWeekStart: 0,
596		parentID: 'body',
597		timeHeightInTimePicker: 25,
598		timepickerScrollbar: true,
599		todayButton: true,
600		prevButton: true,
601		nextButton: true,
602		defaultSelect: true,
603
604		scrollMonth: true,
605		scrollTime: true,
606		scrollInput: true,
607
608		lazyInit: false,
609		mask: false,
610		validateOnBlur: true,
611		allowBlank: true,
612		yearStart: 1950,
613		yearEnd: 2050,
614		monthStart: 0,
615		monthEnd: 11,
616		style: '',
617		id: '',
618		fixed: false,
619		roundTime: 'round', // ceil, floor
620		className: '',
621		weekends: [],
622		highlightedDates: [],
623		highlightedPeriods: [],
624		allowDates : [],
625		allowDateRe : null,
626		disabledDates : [],
627		disabledWeekDays: [],
628		yearOffset: 0,
629		beforeShowDay: null,
630
631		enterLikeTab: true,
632		showApplyButton: false
633	};
634
635	var dateHelper = null,
636		globalLocaleDefault = 'en',
637		globalLocale = 'en';
638
639	var dateFormatterOptionsDefault = {
640		meridiem: ['AM', 'PM']
641	};
642
643	var initDateFormatter = function(){
644		var locale = default_options.i18n[globalLocale],
645			opts = {
646				days: locale.dayOfWeek,
647				daysShort: locale.dayOfWeekShort,
648				months: locale.months,
649				monthsShort: $.map(locale.months, function(n){ return n.substring(0, 3) })
650			};
651
652		if (typeof DateFormatter === 'function') {
653			dateHelper = new DateFormatter({
654				dateSettings: $.extend({}, dateFormatterOptionsDefault, opts)
655			});
656		}
657	};
658
659	// for locale settings
660	$.datetimepicker = {
661		setLocale: function(locale){
662			var newLocale = default_options.i18n[locale] ? locale : globalLocaleDefault;
663			if (globalLocale !== newLocale) {
664				globalLocale = newLocale;
665				// reinit date formatter
666				initDateFormatter();
667			}
668		},
669
670		setDateFormatter: function(dateFormatter) {
671			dateHelper = dateFormatter;
672		},
673
674		RFC_2822: 'D, d M Y H:i:s O',
675		ATOM: 'Y-m-d\TH:i:sP',
676		ISO_8601: 'Y-m-d\TH:i:sO',
677		RFC_822: 'D, d M y H:i:s O',
678		RFC_850: 'l, d-M-y H:i:s T',
679		RFC_1036: 'D, d M y H:i:s O',
680		RFC_1123: 'D, d M Y H:i:s O',
681		RSS: 'D, d M Y H:i:s O',
682		W3C: 'Y-m-d\TH:i:sP'
683	};
684
685	// first init date formatter
686	initDateFormatter();
687
688	// fix for ie8
689	if (!window.getComputedStyle) {
690		window.getComputedStyle = function (el) {
691			this.el = el;
692			this.getPropertyValue = function (prop) {
693				var re = /(-([a-z]))/g;
694				if (prop === 'float') {
695					prop = 'styleFloat';
696				}
697				if (re.test(prop)) {
698					prop = prop.replace(re, function (a, b, c) {
699						return c.toUpperCase();
700					});
701				}
702				return el.currentStyle[prop] || null;
703			};
704			return this;
705		};
706	}
707	if (!Array.prototype.indexOf) {
708		Array.prototype.indexOf = function (obj, start) {
709			var i, j;
710			for (i = (start || 0), j = this.length; i < j; i += 1) {
711				if (this[i] === obj) { return i; }
712			}
713			return -1;
714		};
715	}
716
717	Date.prototype.countDaysInMonth = function () {
718		return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
719	};
720
721	$.fn.xdsoftScroller = function (options, percent) {
722		return this.each(function () {
723			var timeboxparent = $(this),
724				pointerEventToXY = function (e) {
725					var out = {x: 0, y: 0},
726						touch;
727					if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
728						touch  = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
729						out.x = touch.clientX;
730						out.y = touch.clientY;
731					} else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
732						out.x = e.clientX;
733						out.y = e.clientY;
734					}
735					return out;
736				},
737				timebox,
738				parentHeight,
739				height,
740				scrollbar,
741				scroller,
742				maximumOffset = 100,
743				start = false,
744				startY = 0,
745				startTop = 0,
746				h1 = 0,
747				touchStart = false,
748				startTopScroll = 0,
749				calcOffset = function () {};
750
751			if (percent === 'hide') {
752				timeboxparent.find('.xdsoft_scrollbar').hide();
753				return;
754			}
755
756			if (!$(this).hasClass('xdsoft_scroller_box')) {
757				timebox = timeboxparent.children().eq(0);
758				parentHeight = timeboxparent[0].clientHeight;
759				height = timebox[0].offsetHeight;
760				scrollbar = $('<div class="xdsoft_scrollbar"></div>');
761				scroller = $('<div class="xdsoft_scroller"></div>');
762				scrollbar.append(scroller);
763
764				timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
765				calcOffset = function calcOffset(event) {
766					var offset = pointerEventToXY(event).y - startY + startTopScroll;
767					if (offset < 0) {
768						offset = 0;
769					}
770					if (offset + scroller[0].offsetHeight > h1) {
771						offset = h1 - scroller[0].offsetHeight;
772					}
773					timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
774				};
775
776				scroller
777					.on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
778						if (!parentHeight) {
779							timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
780						}
781
782						startY = pointerEventToXY(event).y;
783						startTopScroll = parseInt(scroller.css('margin-top'), 10);
784						h1 = scrollbar[0].offsetHeight;
785
786						if (event.type === 'mousedown' || event.type === 'touchstart') {
787							if (options.ownerDocument) {
788								$(options.ownerDocument.body).addClass('xdsoft_noselect');
789							}
790							$([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft_scroller', function arguments_callee() {
791								$([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft_scroller', arguments_callee)
792									.off('mousemove.xdsoft_scroller', calcOffset)
793									.removeClass('xdsoft_noselect');
794							});
795							$(options.ownerDocument.body).on('mousemove.xdsoft_scroller', calcOffset);
796						} else {
797							touchStart = true;
798							event.stopPropagation();
799							event.preventDefault();
800						}
801					})
802					.on('touchmove', function (event) {
803						if (touchStart) {
804							event.preventDefault();
805							calcOffset(event);
806						}
807					})
808					.on('touchend touchcancel', function () {
809						touchStart =  false;
810						startTopScroll = 0;
811					});
812
813				timeboxparent
814					.on('scroll_element.xdsoft_scroller', function (event, percentage) {
815						if (!parentHeight) {
816							timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
817						}
818						percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
819
820						scroller.css('margin-top', maximumOffset * percentage);
821
822						setTimeout(function () {
823							timebox.css('marginTop', -parseInt((timebox[0].offsetHeight - parentHeight) * percentage, 10));
824						}, 10);
825					})
826					.on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
827						var percent, sh;
828						parentHeight = timeboxparent[0].clientHeight;
829						height = timebox[0].offsetHeight;
830						percent = parentHeight / height;
831						sh = percent * scrollbar[0].offsetHeight;
832						if (percent > 1) {
833							scroller.hide();
834						} else {
835							scroller.show();
836							scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
837							maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
838							if (noTriggerScroll !== true) {
839								timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || Math.abs(parseInt(timebox.css('marginTop'), 10)) / (height - parentHeight)]);
840							}
841						}
842					});
843
844				timeboxparent.on('mousewheel', function (event) {
845					var top = Math.abs(parseInt(timebox.css('marginTop'), 10));
846
847					top = top - (event.deltaY * 20);
848					if (top < 0) {
849						top = 0;
850					}
851
852					timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
853					event.stopPropagation();
854					return false;
855				});
856
857				timeboxparent.on('touchstart', function (event) {
858					start = pointerEventToXY(event);
859					startTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
860				});
861
862				timeboxparent.on('touchmove', function (event) {
863					if (start) {
864						event.preventDefault();
865						var coord = pointerEventToXY(event);
866						timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
867					}
868				});
869
870				timeboxparent.on('touchend touchcancel', function () {
871					start = false;
872					startTop = 0;
873				});
874			}
875			timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
876		});
877	};
878
879	$.fn.datetimepicker = function (opt, opt2) {
880		var result = this,
881			KEY0 = 48,
882			KEY9 = 57,
883			_KEY0 = 96,
884			_KEY9 = 105,
885			CTRLKEY = 17,
886			DEL = 46,
887			ENTER = 13,
888			ESC = 27,
889			BACKSPACE = 8,
890			ARROWLEFT = 37,
891			ARROWUP = 38,
892			ARROWRIGHT = 39,
893			ARROWDOWN = 40,
894			TAB = 9,
895			F5 = 116,
896			AKEY = 65,
897			CKEY = 67,
898			VKEY = 86,
899			ZKEY = 90,
900			YKEY = 89,
901			ctrlDown	=	false,
902			options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
903
904			lazyInitTimer = 0,
905			createDateTimePicker,
906			destroyDateTimePicker,
907
908			lazyInit = function (input) {
909				input
910					.on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function initOnActionCallback() {
911						if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
912							return;
913						}
914						clearTimeout(lazyInitTimer);
915						lazyInitTimer = setTimeout(function () {
916
917							if (!input.data('xdsoft_datetimepicker')) {
918								createDateTimePicker(input);
919							}
920							input
921								.off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', initOnActionCallback)
922								.trigger('open.xdsoft');
923						}, 100);
924					});
925			};
926
927		createDateTimePicker = function (input) {
928			var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
929				xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
930				datepicker = $('<div class="xdsoft_datepicker active"></div>'),
931				month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
932					'<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
933					'<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
934					'<button type="button" class="xdsoft_next"></button></div>'),
935				calendar = $('<div class="xdsoft_calendar"></div>'),
936				timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
937				timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
938				timebox = $('<div class="xdsoft_time_variant"></div>'),
939				applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
940
941				monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
942				yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
943				triggerAfterOpen = false,
944				XDSoft_datetime,
945
946				xchangeTimer,
947				timerclick,
948				current_time_index,
949				setPos,
950				timer = 0,
951				_xdsoft_datetime,
952				forEachAncestorOf;
953
954			if (options.id) {
955				datetimepicker.attr('id', options.id);
956			}
957			if (options.style) {
958				datetimepicker.attr('style', options.style);
959			}
960			if (options.weeks) {
961				datetimepicker.addClass('xdsoft_showweeks');
962			}
963			if (options.rtl) {
964				datetimepicker.addClass('xdsoft_rtl');
965			}
966
967			datetimepicker.addClass('xdsoft_' + options.theme);
968			datetimepicker.addClass(options.className);
969
970			month_picker
971				.find('.xdsoft_month span')
972				.after(monthselect);
973			month_picker
974				.find('.xdsoft_year span')
975				.after(yearselect);
976
977			month_picker
978				.find('.xdsoft_month,.xdsoft_year')
979				.on('touchstart mousedown.xdsoft', function (event) {
980					var select = $(this).find('.xdsoft_select').eq(0),
981						val = 0,
982						top = 0,
983						visible = select.is(':visible'),
984						items,
985						i;
986
987					month_picker
988						.find('.xdsoft_select')
989						.hide();
990					if (_xdsoft_datetime.currentTime) {
991						val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
992					}
993
994					select[visible ? 'hide' : 'show']();
995					for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
996						if (items.eq(i).data('value') === val) {
997							break;
998						} else {
999							top += items[0].offsetHeight;
1000						}
1001					}
1002
1003					select.xdsoftScroller(options, top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
1004					event.stopPropagation();
1005					return false;
1006				});
1007
1008			
vendor: 6,512 bytes, lines 1008-1187
1008var handleTouchMoved = function (event) {
1009				this.touchStartPosition = this.touchStartPosition || event.originalEvent.touches[0]
1010				var touchPosition = event.originalEvent.touches[0]
1011				var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX)
1012				var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY)
1013				var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement)
1014				if(distance > options.touchMovedThreshold) {
1015					this.touchMoved = true;
1016				}
1017			}
1018
1019			month_picker
1020				.find('.xdsoft_select')
1021				.xdsoftScroller(options)
1022				.on('touchstart mousedown.xdsoft', function (event) {
1023					this.touchMoved = false;
1024					this.touchStartPosition = event.originalEvent.touches[0]
1025					event.stopPropagation();
1026					event.preventDefault();
1027				})
1028				.on('touchmove', '.xdsoft_option', handleTouchMoved)
1029				.on('touchend mousedown.xdsoft', '.xdsoft_option', function () {
1030					if (!this.touchMoved) {
1031						if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
1032							_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1033						}
1034
1035						var year = _xdsoft_datetime.currentTime.getFullYear();
1036						if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
1037							_xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
1038						}
1039
1040						$(this).parent().parent().hide();
1041
1042						datetimepicker.trigger('xchange.xdsoft');
1043						if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1044							options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1045						}
1046
1047						if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
1048							options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1049						}
1050					}
1051				});
1052
1053			datetimepicker.getValue = function () {
1054				return _xdsoft_datetime.getCurrentTime();
1055			};
1056
1057			datetimepicker.setOptions = function (_options) {
1058				var highlightedDates = {};
1059
1060				options = $.extend(true, {}, options, _options);
1061
1062				if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
1063					options.allowTimes = $.extend(true, [], _options.allowTimes);
1064				}
1065
1066				if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
1067					options.weekends = $.extend(true, [], _options.weekends);
1068				}
1069
1070				if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) {
1071					options.allowDates = $.extend(true, [], _options.allowDates);
1072				}
1073
1074				if (_options.allowDateRe && Object.prototype.toString.call(_options.allowDateRe)==="[object String]") {
1075					options.allowDateRe = new RegExp(_options.allowDateRe);
1076				}
1077
1078				if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) {
1079					$.each(_options.highlightedDates, function (index, value) {
1080						var splitData = $.map(value.split(','), $.trim),
1081							exDesc,
1082							hDate = new HighlightedDate(dateHelper.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style
1083							keyDate = dateHelper.formatDate(hDate.date, options.formatDate);
1084						if (highlightedDates[keyDate] !== undefined) {
1085							exDesc = highlightedDates[keyDate].desc;
1086							if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1087								highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1088							}
1089						} else {
1090							highlightedDates[keyDate] = hDate;
1091						}
1092					});
1093
1094					options.highlightedDates = $.extend(true, [], highlightedDates);
1095				}
1096
1097				if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) {
1098					highlightedDates = $.extend(true, [], options.highlightedDates);
1099					$.each(_options.highlightedPeriods, function (index, value) {
1100						var dateTest, // start date
1101							dateEnd,
1102							desc,
1103							hDate,
1104							keyDate,
1105							exDesc,
1106							style;
1107						if ($.isArray(value)) {
1108							dateTest = value[0];
1109							dateEnd = value[1];
1110							desc = value[2];
1111							style = value[3];
1112						}
1113						else {
1114							var splitData = $.map(value.split(','), $.trim);
1115							dateTest = dateHelper.parseDate(splitData[0], options.formatDate);
1116							dateEnd = dateHelper.parseDate(splitData[1], options.formatDate);
1117							desc = splitData[2];
1118							style = splitData[3];
1119						}
1120
1121						while (dateTest <= dateEnd) {
1122							hDate = new HighlightedDate(dateTest, desc, style);
1123							keyDate = dateHelper.formatDate(dateTest, options.formatDate);
1124							dateTest.setDate(dateTest.getDate() + 1);
1125							if (highlightedDates[keyDate] !== undefined) {
1126								exDesc = highlightedDates[keyDate].desc;
1127								if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
1128									highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
1129								}
1130							} else {
1131								highlightedDates[keyDate] = hDate;
1132							}
1133						}
1134					});
1135
1136					options.highlightedDates = $.extend(true, [], highlightedDates);
1137				}
1138
1139				if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
1140					options.disabledDates = $.extend(true, [], _options.disabledDates);
1141				}
1142
1143				if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) {
1144					options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays);
1145				}
1146
1147				if ((options.open || options.opened) && (!options.inline)) {
1148					input.trigger('open.xdsoft');
1149				}
1150
1151				if (options.inline) {
1152					triggerAfterOpen = true;
1153					datetimepicker.addClass('xdsoft_inline');
1154					input.after(datetimepicker).hide();
1155				}
1156
1157				if (options.inverseButton) {
1158					options.next = 'xdsoft_prev';
1159					options.prev = 'xdsoft_next';
1160				}
1161
1162				if (options.datepicker) {
1163					datepicker.addClass('active');
1164				} else {
1165					datepicker.removeClass('active');
1166				}
1167
1168				if (options.timepicker) {
1169					timepicker.addClass('active');
1170				} else {
1171					timepicker.removeClass('active');
1172				}
1173
1174				if (options.value) {
1175					_xdsoft_datetime.setCurrentTime(options.value);
1176					if (input && input.val) {
1177						input.val(_xdsoft_datetime.str);
1178					}
1179				}
1180
1181				if (isNaN(options.dayOfWeekStart)) {
1182					options.dayOfWeekStart = 0;
1183				} else {
1184					options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
1185				}
1186
1187				if (!options.timepickerScrollbar) {
vendor: 4,310 bytes, lines 1188-1316
1188					timeboxparent.xdsoftScroller(options, 'hide');
1189				}
1190
1191				if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) {
1192					options.minDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate), options.formatDate);
1193				}
1194
1195				if (options.maxDate &&  /^[\+\-](.*)$/.test(options.maxDate)) {
1196					options.maxDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate), options.formatDate);
1197				}
1198
1199                if (options.minDateTime &&  /^\+(.*)$/.test(options.minDateTime)) {
1200                	options.minDateTime = _xdsoft_datetime.strToDateTime(options.minDateTime).dateFormat(options.formatDate);
1201                }
1202
1203				applyButton.toggle(options.showApplyButton);
1204
1205				month_picker
1206					.find('.xdsoft_today_button')
1207					.css('visibility', !options.todayButton ? 'hidden' : 'visible');
1208
1209				month_picker
1210					.find('.' + options.prev)
1211					.css('visibility', !options.prevButton ? 'hidden' : 'visible');
1212
1213				month_picker
1214					.find('.' + options.next)
1215					.css('visibility', !options.nextButton ? 'hidden' : 'visible');
1216
1217				setMask(options);
1218
1219				if (options.validateOnBlur) {
1220					input
1221						.off('blur.xdsoft')
1222						.on('blur.xdsoft', function () {
1223							if (options.allowBlank && (!$.trim($(this).val()).length ||
1224									(typeof options.mask === "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
1225								$(this).val(null);
1226								datetimepicker.data('xdsoft_datetime').empty();
1227							} else {
1228								var d = dateHelper.parseDate($(this).val(), options.format);
1229								if (d) { // parseDate() may skip some invalid parts like date or time, so make it clear for user: show parsed date/time
1230									$(this).val(dateHelper.formatDate(d, options.format));
1231								} else {
1232									var splittedHours   = +([$(this).val()[0], $(this).val()[1]].join('')),
1233										splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
1234
1235									// parse the numbers as 0312 => 03:12
1236									if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
1237										$(this).val([splittedHours, splittedMinutes].map(function (item) {
1238											return item > 9 ? item : '0' + item;
1239										}).join(':'));
1240									} else {
1241										$(this).val(dateHelper.formatDate(_xdsoft_datetime.now(), options.format));
1242									}
1243								}
1244								datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
1245							}
1246
1247							datetimepicker.trigger('changedatetime.xdsoft');
1248							datetimepicker.trigger('close.xdsoft');
1249						});
1250				}
1251				options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
1252
1253				datetimepicker
1254					.trigger('xchange.xdsoft')
1255					.trigger('afterOpen.xdsoft');
1256			};
1257
1258			datetimepicker
1259				.data('options', options)
1260				.on('touchstart mousedown.xdsoft', function (event) {
1261					event.stopPropagation();
1262					event.preventDefault();
1263					yearselect.hide();
1264					monthselect.hide();
1265					return false;
1266				});
1267
1268			//scroll_element = timepicker.find('.xdsoft_time_box');
1269			timeboxparent.append(timebox);
1270			timeboxparent.xdsoftScroller(options);
1271
1272			datetimepicker.on('afterOpen.xdsoft', function () {
1273				timeboxparent.xdsoftScroller(options);
1274			});
1275
1276			datetimepicker
1277				.append(datepicker)
1278				.append(timepicker);
1279
1280			if (options.withoutCopyright !== true) {
1281				datetimepicker
1282					.append(xdsoft_copyright);
1283			}
1284
1285			datepicker
1286				.append(month_picker)
1287				.append(calendar)
1288				.append(applyButton);
1289
1290			$(options.parentID)
1291				.append(datetimepicker);
1292
1293			XDSoft_datetime = function () {
1294				var _this = this;
1295				_this.now = function (norecursion) {
1296					var d = new Date(),
1297						date,
1298						time;
1299
1300					if (!norecursion && options.defaultDate) {
1301						date = _this.strToDateTime(options.defaultDate);
1302						d.setFullYear(date.getFullYear());
1303						d.setMonth(date.getMonth());
1304						d.setDate(date.getDate());
1305					}
1306
1307					if (options.yearOffset) {
1308						d.setFullYear(d.getFullYear() + options.yearOffset);
1309					}
1310
1311					if (!norecursion && options.defaultTime) {
1312						time = _this.strtotime(options.defaultTime);
1313						d.setHours(time.getHours());
1314						d.setMinutes(time.getMinutes());
1315						d.setSeconds(time.getSeconds());
1316						d.setMilliseconds(time.getMillisecond
vendor: 12,228 bytes, lines 1316-1676
1316s());
1317					}
1318					return d;
1319				};
1320
1321				_this.isValidDate = function (d) {
1322					if (Object.prototype.toString.call(d) !== "[object Date]") {
1323						return false;
1324					}
1325					return !isNaN(d.getTime());
1326				};
1327
1328				_this.setCurrentTime = function (dTime, requireValidDate) {
1329					if (typeof dTime === 'string') {
1330						_this.currentTime = _this.strToDateTime(dTime);
1331					}
1332					else if (_this.isValidDate(dTime)) {
1333						_this.currentTime = dTime;
1334					}
1335					else if (!dTime && !requireValidDate && options.allowBlank && !options.inline) {
1336						_this.currentTime = null;
1337					}
1338					else {
1339						_this.currentTime = _this.now();
1340					}
1341
1342					datetimepicker.trigger('xchange.xdsoft');
1343				};
1344
1345				_this.empty = function () {
1346					_this.currentTime = null;
1347				};
1348
1349				_this.getCurrentTime = function () {
1350					return _this.currentTime;
1351				};
1352
1353				_this.nextMonth = function () {
1354
1355					if (_this.currentTime === undefined || _this.currentTime === null) {
1356						_this.currentTime = _this.now();
1357					}
1358
1359					var month = _this.currentTime.getMonth() + 1,
1360						year;
1361					if (month === 12) {
1362						_this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
1363						month = 0;
1364					}
1365
1366					year = _this.currentTime.getFullYear();
1367
1368					_this.currentTime.setDate(
1369						Math.min(
1370							new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1371							_this.currentTime.getDate()
1372						)
1373					);
1374					_this.currentTime.setMonth(month);
1375
1376					if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1377						options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1378					}
1379
1380					if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
1381						options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1382					}
1383
1384					datetimepicker.trigger('xchange.xdsoft');
1385					return month;
1386				};
1387
1388				_this.prevMonth = function () {
1389
1390					if (_this.currentTime === undefined || _this.currentTime === null) {
1391						_this.currentTime = _this.now();
1392					}
1393
1394					var month = _this.currentTime.getMonth() - 1;
1395					if (month === -1) {
1396						_this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
1397						month = 11;
1398					}
1399					_this.currentTime.setDate(
1400						Math.min(
1401							new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
1402							_this.currentTime.getDate()
1403						)
1404					);
1405					_this.currentTime.setMonth(month);
1406					if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
1407						options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1408					}
1409					datetimepicker.trigger('xchange.xdsoft');
1410					return month;
1411				};
1412
1413				_this.getWeekOfYear = function (datetime) {
1414					if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) {
1415						var week = options.onGetWeekOfYear.call(datetimepicker, datetime);
1416						if (typeof week !== 'undefined') {
1417							return week;
1418						}
1419					}
1420					var onejan = new Date(datetime.getFullYear(), 0, 1);
1421
1422					//First week of the year is th one with the first Thursday according to ISO8601
1423					if (onejan.getDay() !== 4) {
1424						onejan.setMonth(0, 1 + ((4 - onejan.getDay()+ 7) % 7));
1425					}
1426
1427					return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
1428				};
1429
1430				_this.strToDateTime = function (sDateTime) {
1431					var tmpDate = [], timeOffset, currentTime;
1432
1433					if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
1434						return sDateTime;
1435					}
1436
1437					tmpDate = /^([+-]{1})(.*)$/.exec(sDateTime);
1438
1439					if (tmpDate) {
1440						tmpDate[2] = dateHelper.parseDate(tmpDate[2], options.formatDate);
1441					}
1442
1443					if (tmpDate  && tmpDate[2]) {
1444						timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
1445						currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
1446					} else {
1447						currentTime = sDateTime ? dateHelper.parseDate(sDateTime, options.format) : _this.now();
1448					}
1449
1450					if (!_this.isValidDate(currentTime)) {
1451						currentTime = _this.now();
1452					}
1453
1454					return currentTime;
1455				};
1456
1457				_this.strToDate = function (sDate) {
1458					if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
1459						return sDate;
1460					}
1461
1462					var currentTime = sDate ? dateHelper.parseDate(sDate, options.formatDate) : _this.now(true);
1463					if (!_this.isValidDate(currentTime)) {
1464						currentTime = _this.now(true);
1465					}
1466					return currentTime;
1467				};
1468
1469				_this.strtotime = function (sTime) {
1470					if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
1471						return sTime;
1472					}
1473					var currentTime = sTime ? dateHelper.parseDate(sTime, options.formatTime) : _this.now(true);
1474					if (!_this.isValidDate(currentTime)) {
1475						currentTime = _this.now(true);
1476					}
1477					return currentTime;
1478				};
1479
1480				_this.str = function () {
1481					return dateHelper.formatDate(_this.currentTime, options.format);
1482				};
1483				_this.currentTime = this.now();
1484			};
1485
1486			_xdsoft_datetime = new XDSoft_datetime();
1487
1488			applyButton.on('touchend click', function (e) {//pathbrite
1489				e.preventDefault();
1490				datetimepicker.data('changed', true);
1491				_xdsoft_datetime.setCurrentTime(getCurrentValue());
1492				input.val(_xdsoft_datetime.str());
1493				datetimepicker.trigger('close.xdsoft');
1494			});
1495			month_picker
1496				.find('.xdsoft_today_button')
1497				.on('touchend mousedown.xdsoft', function () {
1498					datetimepicker.data('changed', true);
1499					_xdsoft_datetime.setCurrentTime(0, true);
1500					datetimepicker.trigger('afterOpen.xdsoft');
1501				}).on('dblclick.xdsoft', function () {
1502				var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
1503				currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
1504				minDate = _xdsoft_datetime.strToDate(options.minDate);
1505				minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1506				if (currentDate < minDate) {
1507					return;
1508				}
1509				maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1510				maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
1511				if (currentDate > maxDate) {
1512					return;
1513				}
1514				input.val(_xdsoft_datetime.str());
1515				input.trigger('change');
1516				datetimepicker.trigger('close.xdsoft');
1517			});
1518			month_picker
1519				.find('.xdsoft_prev,.xdsoft_next')
1520				.on('touchend mousedown.xdsoft', function () {
1521					var $this = $(this),
1522						timer = 0,
1523						stop = false;
1524
1525					(function arguments_callee1(v) {
1526						if ($this.hasClass(options.next)) {
1527							_xdsoft_datetime.nextMonth();
1528						} else if ($this.hasClass(options.prev)) {
1529							_xdsoft_datetime.prevMonth();
1530						}
1531						if (options.monthChangeSpinner) {
1532							if (!stop) {
1533								timer = setTimeout(arguments_callee1, v || 100);
1534							}
1535						}
1536					}(500));
1537
1538					$([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee2() {
1539						clearTimeout(timer);
1540						stop = true;
1541						$([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft', arguments_callee2);
1542					});
1543				});
1544
1545			timepicker
1546				.find('.xdsoft_prev,.xdsoft_next')
1547				.on('touchend mousedown.xdsoft', function () {
1548					var $this = $(this),
1549						timer = 0,
1550						stop = false,
1551						period = 110;
1552					(function arguments_callee4(v) {
1553						var pheight = timeboxparent[0].clientHeight,
1554							height = timebox[0].offsetHeight,
1555							top = Math.abs(parseInt(timebox.css('marginTop'), 10));
1556						if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
1557							timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
1558						} else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
1559							timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
1560						}
1561						/**
1562						 * Fixed bug:
1563						 * When using css3 transition, it will cause a bug that you cannot scroll the timepicker list.
1564						 * The reason is that the transition-duration time, if you set it to 0, all things fine, otherwise, this
1565						 * would cause a bug when you use jquery.css method.
1566						 * Let's say: * { transition: all .5s ease; }
1567						 * jquery timebox.css('marginTop') will return the original value which is before you clicking the next/prev button,
1568						 * meanwhile the timebox[0].style.marginTop will return the right value which is after you clicking the
1569						 * next/prev button.
1570						 *
1571						 * What we should do:
1572						 * Replace timebox.css('marginTop') with timebox[0].style.marginTop.
1573						 */
1574						timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox[0].style.marginTop, 10) / (height - pheight))]);
1575						period = (period > 10) ? 10 : period - 10;
1576						if (!stop) {
1577							timer = setTimeout(arguments_callee4, v || period);
1578						}
1579					}(500));
1580					$([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee5() {
1581						clearTimeout(timer);
1582						stop = true;
1583						$([options.ownerDocument.body, options.contentWindow])
1584							.off('touchend mouseup.xdsoft', arguments_callee5);
1585					});
1586				});
1587
1588			xchangeTimer = 0;
1589			// base handler - generating a calendar and timepicker
1590			datetimepicker
1591				.on('xchange.xdsoft', function (event) {
1592					clearTimeout(xchangeTimer);
1593					xchangeTimer = setTimeout(function () {
1594
1595						if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
1596							_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1597						}
1598
1599						var table =	'',
1600							start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
1601							i = 0,
1602							j,
1603							today = _xdsoft_datetime.now(),
1604							maxDate = false,
1605							minDate = false,
1606                            minDateTime = false,
1607							hDate,
1608							day,
1609							d,
1610							y,
1611							m,
1612							w,
1613							classes = [],
1614							customDateSettings,
1615							newRow = true,
1616							time = '',
1617							h,
1618							line_time,
1619							description;
1620
1621						while (start.getDay() !== options.dayOfWeekStart) {
1622							start.setDate(start.getDate() - 1);
1623						}
1624
1625						table += '<table><thead><tr>';
1626
1627						if (options.weeks) {
1628							table += '<th></th>';
1629						}
1630
1631						for (j = 0; j < 7; j += 1) {
1632							table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>';
1633						}
1634
1635						table += '</tr></thead>';
1636						table += '<tbody>';
1637
1638						if (options.maxDate !== false) {
1639							maxDate = _xdsoft_datetime.strToDate(options.maxDate);
1640							maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
1641						}
1642
1643						if (options.minDate !== false) {
1644							minDate = _xdsoft_datetime.strToDate(options.minDate);
1645							minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
1646						}
1647
1648                        if (options.minDateTime !== false) {
1649							minDateTime = _xdsoft_datetime.strToDate(options.minDateTime);
1650							minDateTime = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), minDateTime.getHours(), minDateTime.getMinutes(), minDateTime.getSeconds());
1651						}
1652
1653						while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
1654							classes = [];
1655							i += 1;
1656
1657							day = start.getDay();
1658							d = start.getDate();
1659							y = start.getFullYear();
1660							m = start.getMonth();
1661							w = _xdsoft_datetime.getWeekOfYear(start);
1662							description = '';
1663
1664							classes.push('xdsoft_date');
1665
1666							if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
1667								customDateSettings = options.beforeShowDay.call(datetimepicker, start);
1668							} else {
1669								customDateSettings = null;
1670							}
1671
1672							if(options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]"){
1673								if(!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))){
1674									classes.push('xdsoft_disabled');
1675								}
1676							}
vendor: 5,883 bytes, lines 1676-1804
1676
1677							
1678							if(options.allowDates && options.allowDates.length>0){
1679								if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){
1680									classes.push('xdsoft_disabled');
1681								}
1682							}
1683							
1684							if ((maxDate !== false && start > maxDate) || (minDateTime !== false && start < minDateTime)  || (minDate !== false && start < minDate) || (customDateSettings && customDateSettings[0] === false)) {
1685								classes.push('xdsoft_disabled');
1686							}
1687							
1688							if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
1689								classes.push('xdsoft_disabled');
1690							}
1691							
1692							if (options.disabledWeekDays.indexOf(day) !== -1) {
1693								classes.push('xdsoft_disabled');
1694							}
1695							
1696							if (input.is('[disabled]')) {
1697								classes.push('xdsoft_disabled');
1698							}
1699
1700							if (customDateSettings && customDateSettings[1] !== "") {
1701								classes.push(customDateSettings[1]);
1702							}
1703
1704							if (_xdsoft_datetime.currentTime.getMonth() !== m) {
1705								classes.push('xdsoft_other_month');
1706							}
1707
1708							if ((options.defaultSelect || datetimepicker.data('changed')) && dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
1709								classes.push('xdsoft_current');
1710							}
1711
1712							if (dateHelper.formatDate(today, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
1713								classes.push('xdsoft_today');
1714							}
1715
1716							if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
1717								classes.push('xdsoft_weekend');
1718							}
1719
1720							if (options.highlightedDates[dateHelper.formatDate(start, options.formatDate)] !== undefined) {
1721								hDate = options.highlightedDates[dateHelper.formatDate(start, options.formatDate)];
1722								classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style);
1723								description = hDate.desc === undefined ? '' : hDate.desc;
1724							}
1725
1726							if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
1727								classes.push(options.beforeShowDay(start));
1728							}
1729
1730							if (newRow) {
1731								table += '<tr>';
1732								newRow = false;
1733								if (options.weeks) {
1734									table += '<th>' + w + '</th>';
1735								}
1736							}
1737
1738							table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' +
1739								'<div>' + d + '</div>' +
1740								'</td>';
1741
1742							if (start.getDay() === options.dayOfWeekStartPrev) {
1743								table += '</tr>';
1744								newRow = true;
1745							}
1746
1747							start.setDate(d + 1);
1748						}
1749						table += '</tbody></table>';
1750
1751						calendar.html(table);
1752
1753						month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
1754						month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear());
1755
1756						// generate timebox
1757						time = '';
1758						h = '';
1759						m = '';
1760
1761						line_time = function line_time(h, m) {
1762							var now = _xdsoft_datetime.now(), optionDateTime, current_time,
1763								isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
1764							now.setHours(h);
1765							h = parseInt(now.getHours(), 10);
1766							now.setMinutes(m);
1767							m = parseInt(now.getMinutes(), 10);
1768							optionDateTime = new Date(_xdsoft_datetime.currentTime);
1769							optionDateTime.setHours(h);
1770							optionDateTime.setMinutes(m);
1771							classes = [];
1772							if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || (options.maxTime !== false && _xdsoft_datetime.strtotime(options.maxTime).getTime() < now.getTime()) || (options.minTime !== false && _xdsoft_datetime.strtotime(options.minTime).getTime() > now.getTime())) {
1773								classes.push('xdsoft_disabled');
1774							} else if ((options.minDateTime !== false && options.minDateTime > optionDateTime) || ((options.disabledMinTime !== false && now.getTime() > _xdsoft_datetime.strtotime(options.disabledMinTime).getTime()) && (options.disabledMaxTime !== false && now.getTime() < _xdsoft_datetime.strtotime(options.disabledMaxTime).getTime()))) {
1775								classes.push('xdsoft_disabled');
1776							} else if (input.is('[disabled]')) {
1777								classes.push('xdsoft_disabled');
1778							}
1779
1780							current_time = new Date(_xdsoft_datetime.currentTime);
1781							current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
1782
1783							if (!isALlowTimesInit) {
1784								current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
1785							}
1786
1787							if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && ((!isALlowTimesInit && options.step > 59) || current_time.getMinutes() === parseInt(m, 10))) {
1788								if (options.defaultSelect || datetimepicker.data('changed')) {
1789									classes.push('xdsoft_current');
1790								} else if (options.initTime) {
1791									classes.push('xdsoft_init_time');
1792								}
1793							}
1794							if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
1795								classes.push('xdsoft_today');
1796							}
1797							time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + dateHelper.formatDate(now, options.formatTime) + '</div>';
1798						};
1799
1800						if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
1801							for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
1802								for (j = 0; j < 60; j += options.step) {
1803									h = (i < 10 ? '0' : '') + i;
1804									m = (j < 10 ? '0'
vendor: 3,273 bytes, lines 1804-1890
1804 : '') + j;
1805									line_time(h, m);
1806								}
1807							}
1808						} else {
1809							for (i = 0; i < options.allowTimes.length; i += 1) {
1810								h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
1811								m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
1812								line_time(h, m);
1813							}
1814						}
1815
1816						timebox.html(time);
1817
1818						opt = '';
1819
1820						for (i = parseInt(options.yearStart, 10) + options.yearOffset; i <= parseInt(options.yearEnd, 10) + options.yearOffset; i += 1) {
1821							opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + i + '</div>';
1822						}
1823						yearselect.children().eq(0)
1824							.html(opt);
1825
1826						for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10); i += 1) {
1827							opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>';
1828						}
1829						monthselect.children().eq(0).html(opt);
1830						$(datetimepicker)
1831							.trigger('generate.xdsoft');
1832					}, 10);
1833					event.stopPropagation();
1834				})
1835				.on('afterOpen.xdsoft', function () {
1836					if (options.timepicker) {
1837						var classType, pheight, height, top;
1838						if (timebox.find('.xdsoft_current').length) {
1839							classType = '.xdsoft_current';
1840						} else if (timebox.find('.xdsoft_init_time').length) {
1841							classType = '.xdsoft_init_time';
1842						}
1843						if (classType) {
1844							pheight = timeboxparent[0].clientHeight;
1845							height = timebox[0].offsetHeight;
1846							top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
1847							if ((height - pheight) < top) {
1848								top = height - pheight;
1849							}
1850							timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
1851						} else {
1852							timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
1853						}
1854					}
1855				});
1856
1857			timerclick = 0;
1858			calendar
1859				.on('touchend click.xdsoft', 'td', function (xdevent) {
1860					xdevent.stopPropagation();  // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
1861					timerclick += 1;
1862					var $this = $(this),
1863						currentTime = _xdsoft_datetime.currentTime;
1864
1865					if (currentTime === undefined || currentTime === null) {
1866						_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1867						currentTime = _xdsoft_datetime.currentTime;
1868					}
1869
1870					if ($this.hasClass('xdsoft_disabled')) {
1871						return false;
1872					}
1873
1874					currentTime.setDate(1);
1875					currentTime.setFullYear($this.data('year'));
1876					currentTime.setMonth($this.data('month'));
1877					currentTime.setDate($this.data('date'));
1878
1879					datetimepicker.trigger('select.xdsoft', [currentTime]);
1880
1881					input.val(_xdsoft_datetime.str());
1882
1883					if (options.onSelectDate &&	$.isFunction(options.onSelectDate)) {
1884						options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1885					}
1886
1887					datetimepicker.data('changed', true);
1888					datetimepicker.trigger('xchange.xdsoft');
1889					datetimepicker.trigger('changedatetime.xdsoft');
1890					if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !
vendor: 5,387 bytes, lines 1890-2063
1890options.timepicker))) && !options.inline) {
1891						datetimepicker.trigger('close.xdsoft');
1892					}
1893					setTimeout(function () {
1894						timerclick = 0;
1895					}, 200);
1896				});
1897
1898			timebox
1899				.on('touchstart', 'div', function (xdevent) {
1900					this.touchMoved = false;
1901				})
1902				.on('touchmove', 'div', handleTouchMoved)
1903				.on('touchend click.xdsoft', 'div', function (xdevent) {
1904					if (!this.touchMoved) {
1905						xdevent.stopPropagation();
1906						var $this = $(this),
1907							currentTime = _xdsoft_datetime.currentTime;
1908
1909						if (currentTime === undefined || currentTime === null) {
1910							_xdsoft_datetime.currentTime = _xdsoft_datetime.now();
1911							currentTime = _xdsoft_datetime.currentTime;
1912						}
1913
1914						if ($this.hasClass('xdsoft_disabled')) {
1915							return false;
1916						}
1917						currentTime.setHours($this.data('hour'));
1918						currentTime.setMinutes($this.data('minute'));
1919						datetimepicker.trigger('select.xdsoft', [currentTime]);
1920
1921						datetimepicker.data('input').val(_xdsoft_datetime.str());
1922
1923						if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
1924							options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
1925						}
1926						datetimepicker.data('changed', true);
1927						datetimepicker.trigger('xchange.xdsoft');
1928						datetimepicker.trigger('changedatetime.xdsoft');
1929						if (options.inline !== true && options.closeOnTimeSelect === true) {
1930							datetimepicker.trigger('close.xdsoft');
1931						}
1932					}
1933				});
1934
1935			datepicker
1936				.on('mousewheel.xdsoft', function (event) {
1937					if (!options.scrollMonth) {
1938						return true;
1939					}
1940					if (event.deltaY < 0) {
1941						_xdsoft_datetime.nextMonth();
1942					} else {
1943						_xdsoft_datetime.prevMonth();
1944					}
1945					return false;
1946				});
1947
1948			input
1949				.on('mousewheel.xdsoft', function (event) {
1950					if (!options.scrollInput) {
1951						return true;
1952					}
1953					if (!options.datepicker && options.timepicker) {
1954						current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
1955						if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
1956							current_time_index += event.deltaY;
1957						}
1958						if (timebox.children().eq(current_time_index).length) {
1959							timebox.children().eq(current_time_index).trigger('mousedown');
1960						}
1961						return false;
1962					}
1963					if (options.datepicker && !options.timepicker) {
1964						datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
1965						if (input.val) {
1966							input.val(_xdsoft_datetime.str());
1967						}
1968						datetimepicker.trigger('changedatetime.xdsoft');
1969						return false;
1970					}
1971				});
1972
1973			datetimepicker
1974				.on('changedatetime.xdsoft', function (event) {
1975					if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
1976						var $input = datetimepicker.data('input');
1977						options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
1978						delete options.value;
1979						$input.trigger('change');
1980					}
1981				})
1982				.on('generate.xdsoft', function () {
1983					if (options.onGenerate && $.isFunction(options.onGenerate)) {
1984						options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
1985					}
1986					if (triggerAfterOpen) {
1987						datetimepicker.trigger('afterOpen.xdsoft');
1988						triggerAfterOpen = false;
1989					}
1990				})
1991				.on('click.xdsoft', function (xdevent) {
1992					xdevent.stopPropagation();
1993				});
1994
1995			current_time_index = 0;
1996
1997			/**
1998			 * Runs the callback for each of the specified node's ancestors.
1999			 *
2000			 * Return FALSE from the callback to stop ascending.
2001			 *
2002			 * @param {DOMNode} node
2003			 * @param {Function} callback
2004			 * @returns {undefined}
2005			 */
2006			forEachAncestorOf = function (node, callback) {
2007				do {
2008					node = node.parentNode;
2009
2010					if (!node || callback(node) === false) {
2011						break;
2012					}
2013				} while (node.nodeName !== 'HTML');
2014			};
2015
2016			/**
2017			 * Sets the position of the picker.
2018			 *
2019			 * @returns {undefined}
2020			 */
2021			setPos = function () {
2022				var dateInputOffset,
2023					dateInputElem,
2024					verticalPosition,
2025					left,
2026					position,
2027					datetimepickerElem,
2028					dateInputHasFixedAncestor,
2029					$dateInput,
2030					windowWidth,
2031					verticalAnchorEdge,
2032					datetimepickerCss,
2033					windowHeight,
2034					windowScrollTop;
2035
2036				$dateInput = datetimepicker.data('input');
2037				dateInputOffset = $dateInput.offset();
2038				dateInputElem = $dateInput[0];
2039
2040				verticalAnchorEdge = 'top';
2041				verticalPosition = (dateInputOffset.top + dateInputElem.offsetHeight) - 1;
2042				left = dateInputOffset.left;
2043				position = "absolute";
2044
2045				windowWidth = $(options.contentWindow).width();
2046				windowHeight = $(options.contentWindow).height();
2047				windowScrollTop = $(options.contentWindow).scrollTop();
2048
2049				if ((options.ownerDocument.documentElement.clientWidth - dateInputOffset.left) < datepicker.parent().outerWidth(true)) {
2050					var diff = datepicker.parent().outerWidth(true) - dateInputElem.offsetWidth;
2051					left = left - diff;
2052				}
2053
2054				if ($dateInput.parent().css('direction') === 'rtl') {
2055					left -= (datetimepicker.outerWidth() - $dateInput.outerWidth());
2056				}
2057
2058				if (options.fixed) {
2059					verticalPosition -= windowScrollTop;
2060					left -= $(options.contentWindow).scrollLeft();
2061					position = "fixed";
2062				} else {
2063					dateInputHasFixedAncestor = false;
vendor: 6,662 bytes, lines 2064-2279
2064
2065					forEachAncestorOf(dateInputElem, function (ancestorNode) {
2066						if (ancestorNode === null) {
2067							return false;
2068						}
2069
2070						if (options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') {
2071							dateInputHasFixedAncestor = true;
2072							return false;
2073						}
2074					});
2075
2076					if (dateInputHasFixedAncestor) {
2077						position = 'fixed';
2078
2079						//If the picker won't fit entirely within the viewport then display it above the date input.
2080						if (verticalPosition + datetimepicker.outerHeight() > windowHeight + windowScrollTop) {
2081							verticalAnchorEdge = 'bottom';
2082							verticalPosition = (windowHeight + windowScrollTop) - dateInputOffset.top;
2083						} else {
2084							verticalPosition -= windowScrollTop;
2085						}
2086					} else {
2087						if (verticalPosition + datetimepicker[0].offsetHeight > windowHeight + windowScrollTop) {
2088							verticalPosition = dateInputOffset.top - datetimepicker[0].offsetHeight + 1;
2089						}
2090					}
2091
2092					if (verticalPosition < 0) {
2093						verticalPosition = 0;
2094					}
2095
2096					if (left + dateInputElem.offsetWidth > windowWidth) {
2097						left = windowWidth - dateInputElem.offsetWidth;
2098					}
2099				}
2100
2101				datetimepickerElem = datetimepicker[0];
2102
2103				forEachAncestorOf(datetimepickerElem, function (ancestorNode) {
2104					var ancestorNodePosition;
2105
2106					ancestorNodePosition = options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position');
2107
2108					if (ancestorNodePosition === 'relative' && windowWidth >= ancestorNode.offsetWidth) {
2109						left = left - ((windowWidth - ancestorNode.offsetWidth) / 2);
2110						return false;
2111					}
2112				});
2113
2114				datetimepickerCss = {
2115					position: position,
2116					left: left,
2117					top: '',  //Initialize to prevent previous values interfering with new ones.
2118					bottom: ''  //Initialize to prevent previous values interfering with new ones.
2119				};
2120
2121				datetimepickerCss[verticalAnchorEdge] = verticalPosition;
2122
2123				datetimepicker.css(datetimepickerCss);
2124			};
2125
2126			datetimepicker
2127				.on('open.xdsoft', function (event) {
2128					var onShow = true;
2129					if (options.onShow && $.isFunction(options.onShow)) {
2130						onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
2131					}
2132					if (onShow !== false) {
2133						datetimepicker.show();
2134						setPos();
2135						$(options.contentWindow)
2136							.off('resize.xdsoft', setPos)
2137							.on('resize.xdsoft', setPos);
2138
2139						if (options.closeOnWithoutClick) {
2140							$([options.ownerDocument.body, options.contentWindow]).on('touchstart mousedown.xdsoft', function arguments_callee6() {
2141								datetimepicker.trigger('close.xdsoft');
2142								$([options.ownerDocument.body, options.contentWindow]).off('touchstart mousedown.xdsoft', arguments_callee6);
2143							});
2144						}
2145					}
2146				})
2147				.on('close.xdsoft', function (event) {
2148					var onClose = true;
2149					month_picker
2150						.find('.xdsoft_month,.xdsoft_year')
2151						.find('.xdsoft_select')
2152						.hide();
2153					if (options.onClose && $.isFunction(options.onClose)) {
2154						onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
2155					}
2156					if (onClose !== false && !options.opened && !options.inline) {
2157						datetimepicker.hide();
2158					}
2159					event.stopPropagation();
2160				})
2161				.on('toggle.xdsoft', function () {
2162					if (datetimepicker.is(':visible')) {
2163						datetimepicker.trigger('close.xdsoft');
2164					} else {
2165						datetimepicker.trigger('open.xdsoft');
2166					}
2167				})
2168				.data('input', input);
2169
2170			timer = 0;
2171
2172			datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
2173			datetimepicker.setOptions(options);
2174
2175			function getCurrentValue() {
2176				var ct = false, time;
2177
2178				if (options.startDate) {
2179					ct = _xdsoft_datetime.strToDate(options.startDate);
2180				} else {
2181					ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
2182					if (ct) {
2183						ct = _xdsoft_datetime.strToDateTime(ct);
2184					} else if (options.defaultDate) {
2185						ct = _xdsoft_datetime.strToDateTime(options.defaultDate);
2186						if (options.defaultTime) {
2187							time = _xdsoft_datetime.strtotime(options.defaultTime);
2188							ct.setHours(time.getHours());
2189							ct.setMinutes(time.getMinutes());
2190						}
2191					}
2192				}
2193
2194				if (ct && _xdsoft_datetime.isValidDate(ct)) {
2195					datetimepicker.data('changed', true);
2196				} else {
2197					ct = '';
2198				}
2199
2200				return ct || 0;
2201			}
2202
2203			function setMask(options) {
2204
2205				var isValidValue = function (mask, value) {
2206						var reg = mask
2207							.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
2208							.replace(/_/g, '{digit+}')
2209							.replace(/([0-9]{1})/g, '{digit$1}')
2210							.replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
2211							.replace(/\{digit[\+]\}/g, '[0-9_]{1}');
2212						return (new RegExp(reg)).test(value);
2213					},
2214					getCaretPos = function (input) {
2215						try {
2216							if (options.ownerDocument.selection && options.ownerDocument.selection.createRange) {
2217								var range = options.ownerDocument.selection.createRange();
2218								return range.getBookmark().charCodeAt(2) - 2;
2219							}
2220							if (input.setSelectionRange) {
2221								return input.selectionStart;
2222							}
2223						} catch (e) {
2224							return 0;
2225						}
2226					},
2227					setCaretPos = function (node, pos) {
2228						node = (typeof node === "string" || node instanceof String) ? options.ownerDocument.getElementById(node) : node;
2229						if (!node) {
2230							return false;
2231						}
2232						if (node.createTextRange) {
2233							var textRange = node.createTextRange();
2234							textRange.collapse(true);
2235							textRange.moveEnd('character', pos);
2236							textRange.moveStart('character', pos);
2237							textRange.select();
2238							return true;
2239						}
2240						if (node.setSelectionRange) {
2241							node.setSelectionRange(pos, pos);
2242							return true;
2243						}
2244						return false;
2245					};
2246
2247				if(options.mask) {
2248					input.off('keydown.xdsoft');
2249				}
2250
2251				if (options.mask === true) {
2252					if (typeof moment != 'undefined') {
2253						options.mask = options.format
2254							.replace(/Y{4}/g, '9999')
2255							.replace(/Y{2}/g, '99')
2256							.replace(/M{2}/g, '19')
2257							.replace(/D{2}/g, '39')
2258							.replace(/H{2}/g, '29')
2259							.replace(/m{2}/g, '59')
2260							.replace(/s{2}/g, '59');
2261					} else {
2262						options.mask = options.format
2263							.replace(/Y/g, '9999')
2264							.replace(/F/g, '9999')
2265							.replace(/m/g, '19')
2266							.replace(/d/g, '39')
2267							.replace(/H/g, '29')
2268							.replace(/i/g, '59')
2269							.replace(/s/g, '59');
2270					}
2271				}
2272
2273				if ($.type(options.mask) === 'string') {
2274					if (!isValidValue(options.mask, input.val())) {
2275						input.val(options.mask.replace(/[0-9]/g, '_'));
2276						setCaretPos(input[0], 0);
2277					}
2278
2279					input.on('
vendor: 9,273 bytes, lines 2279-2562
2279paste.xdsoft', function (event) {
2280					    // couple options here
2281					    // 1. return false - tell them they can't paste
2282					    // 2. insert over current characters - minimal validation
2283					    // 3. full fledged parsing and validation
2284					    // let's go option 2 for now
2285
2286					    // fires multiple times for some reason
2287
2288					    // https://stackoverflow.com/a/30496488/1366033
2289					    var clipboardData = event.clipboardData || event.originalEvent.clipboardData || window.clipboardData,
2290						pastedData = clipboardData.getData('text'),
2291						val = this.value,
2292						pos = this.selectionStart
2293
2294					    var valueBeforeCursor = val.substr(0, pos);
2295					    var valueAfterPaste = val.substr(pos + pastedData.length);
2296
2297					    val = valueBeforeCursor + pastedData + valueAfterPaste;           
2298					    pos += pastedData.length;
2299
2300					    if (isValidValue(options.mask, val)) {
2301						this.value = val;
2302						setCaretPos(this, pos);
2303					    } else if ($.trim(val) === '') {
2304						this.value = options.mask.replace(/[0-9]/g, '_');
2305					    } else {
2306						input.trigger('error_input.xdsoft');
2307					    }
2308
2309					    event.preventDefault();
2310					    return false;
2311					  });
2312
2313					  input.on('keydown.xdsoft', function (event) {
2314					    var val = this.value,
2315						key = event.which,
2316						pos = this.selectionStart,
2317						selEnd = this.selectionEnd,
2318						hasSel = pos !== selEnd,
2319						digit;
2320
2321					    // only alow these characters
2322					    if (((key >=  KEY0 && key <=  KEY9)  ||
2323						 (key >= _KEY0 && key <= _KEY9)) || 
2324						 (key === BACKSPACE || key === DEL)) {
2325
2326					      // get char to insert which is new character or placeholder ('_')
2327					      digit = (key === BACKSPACE || key === DEL) ? '_' :
2328							  String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key);
2329
2330						// we're deleting something, we're not at the start, and have normal cursor, move back one
2331						// if we have a selection length, cursor actually sits behind deletable char, not in front
2332						if (key === BACKSPACE && pos && !hasSel) {
2333						    pos -= 1;
2334						}
2335
2336						// don't stop on a separator, continue whatever direction you were going
2337						//   value char - keep incrementing position while on separator char and we still have room
2338						//   del char   - keep decrementing position while on separator char and we still have room
2339						while (true) {
2340						  var maskValueAtCurPos = options.mask.substr(pos, 1);
2341						  var posShorterThanMaskLength = pos < options.mask.length;
2342						  var posGreaterThanZero = pos > 0;
2343						  var notNumberOrPlaceholder = /[^0-9_]/;
2344						  var curPosOnSep = notNumberOrPlaceholder.test(maskValueAtCurPos);
2345						  var continueMovingPosition = curPosOnSep && posShorterThanMaskLength && posGreaterThanZero
2346
2347						  // if we hit a real char, stay where we are
2348						  if (!continueMovingPosition) break;
2349
2350						  // hitting backspace in a selection, you can possibly go back any further - go forward
2351						  pos += (key === BACKSPACE && !hasSel) ? -1 : 1;
2352
2353						}
2354
2355
2356						if (hasSel) {
2357						  // pos might have moved so re-calc length
2358						  var selLength = selEnd - pos
2359
2360						  // if we have a selection length we will wipe out entire selection and replace with default template for that range
2361						  var defaultBlank = options.mask.replace(/[0-9]/g, '_');
2362						  var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength); 
2363						  var selReplacementRemainder = defaultBlankSelectionReplacement.substr(1) // might be empty
2364
2365						  var valueBeforeSel = val.substr(0, pos);
2366						  var insertChars = digit + selReplacementRemainder;
2367						  var charsAfterSelection = val.substr(pos + selLength);
2368
2369						  val = valueBeforeSel + insertChars + charsAfterSelection
2370
2371						} else {
2372						  var valueBeforeCursor = val.substr(0, pos);
2373						  var insertChar = digit;
2374						  var valueAfterNextChar = val.substr(pos + 1);
2375
2376						  val = valueBeforeCursor + insertChar + valueAfterNextChar
2377						}
2378
2379						if ($.trim(val) === '') {
2380						  // if empty, set to default
2381						    val = defaultBlank
2382						} else {
2383						  // if at the last character don't need to do anything
2384						    if (pos === options.mask.length) {
2385							event.preventDefault();
2386							return false;
2387						    }
2388						}
2389
2390						// resume cursor location
2391						pos += (key === BACKSPACE) ? 0 : 1;
2392						// don't stop on a separator, continue whatever direction you were going
2393						while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
2394						    pos += (key === BACKSPACE) ? 0 : 1;
2395						}
2396
2397						if (isValidValue(options.mask, val)) {
2398						    this.value = val;
2399						    setCaretPos(this, pos);
2400						} else if ($.trim(val) === '') {
2401						    this.value = options.mask.replace(/[0-9]/g, '_');
2402						} else {
2403						    input.trigger('error_input.xdsoft');
2404						}
2405					    } else {
2406						if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
2407						    return true;
2408						}
2409					    }
2410
2411					    event.preventDefault();
2412					    return false;
2413					  });
2414				}
2415			}
2416
2417			_xdsoft_datetime.setCurrentTime(getCurrentValue());
2418
2419			input
2420				.data('xdsoft_datetimepicker', datetimepicker)
2421				.on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function () {
2422					if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
2423						return;
2424					}
2425					if (!options.openOnFocus) {
2426						return;
2427					}
2428					clearTimeout(timer);
2429					timer = setTimeout(function () {
2430						if (input.is(':disabled')) {
2431							return;
2432						}
2433
2434						triggerAfterOpen = true;
2435						_xdsoft_datetime.setCurrentTime(getCurrentValue(), true);
2436						if(options.mask) {
2437							setMask(options);
2438						}
2439						datetimepicker.trigger('open.xdsoft');
2440					}, 100);
2441				})
2442				.on('keydown.xdsoft', function (event) {
2443					var elementSelector,
2444						key = event.which;
2445					if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
2446						elementSelector = $("input:visible,textarea:visible,button:visible,a:visible");
2447						datetimepicker.trigger('close.xdsoft');
2448						elementSelector.eq(elementSelector.index(this) + 1).focus();
2449						return false;
2450					}
2451					if ([TAB].indexOf(key) !== -1) {
2452						datetimepicker.trigger('close.xdsoft');
2453						return true;
2454					}
2455				})
2456				.on('blur.xdsoft', function () {
2457					datetimepicker.trigger('close.xdsoft');
2458				});
2459		};
2460		destroyDateTimePicker = function (input) {
2461			var datetimepicker = input.data('xdsoft_datetimepicker');
2462			if (datetimepicker) {
2463				datetimepicker.data('xdsoft_datetime', null);
2464				datetimepicker.remove();
2465				input
2466					.data('xdsoft_datetimepicker', null)
2467					.off('.xdsoft');
2468				$(options.contentWindow).off('resize.xdsoft');
2469				$([options.contentWindow, options.ownerDocument.body]).off('mousedown.xdsoft touchstart');
2470				if (input.unmousewheel) {
2471					input.unmousewheel();
2472				}
2473			}
2474		};
2475		$(options.ownerDocument)
2476			.off('keydown.xdsoftctrl keyup.xdsoftctrl')
2477			.on('keydown.xdsoftctrl', function (e) {
2478				if (e.keyCode === CTRLKEY) {
2479					ctrlDown = true;
2480				}
2481			})
2482			.on('keyup.xdsoftctrl', function (e) {
2483				if (e.keyCode === CTRLKEY) {
2484					ctrlDown = false;
2485				}
2486			});
2487
2488		this.each(function () {
2489			var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
2490			if (datetimepicker) {
2491				if ($.type(opt) === 'string') {
2492					switch (opt) {
2493						case 'show':
2494							$(this).select().focus();
2495							datetimepicker.trigger('open.xdsoft');
2496							break;
2497						case 'hide':
2498							datetimepicker.trigger('close.xdsoft');
2499							break;
2500						case 'toggle':
2501							datetimepicker.trigger('toggle.xdsoft');
2502							break;
2503						case 'destroy':
2504							destroyDateTimePicker($(this));
2505							break;
2506						case 'reset':
2507							this.value = this.defaultValue;
2508							if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value, options.format))) {
2509								datetimepicker.data('changed', false);
2510							}
2511							datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
2512							break;
2513						case 'validate':
2514							$input = datetimepicker.data('input');
2515							$input.trigger('blur.xdsoft');
2516							break;
2517						default:
2518							if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) {
2519								result = datetimepicker[opt](opt2);
2520							}
2521					}
2522				} else {
2523					datetimepicker
2524						.setOptions(opt);
2525				}
2526				return 0;
2527			}
2528			if ($.type(opt) !== 'string') {
2529				if (!options.lazyInit || options.open || options.inline) {
2530					createDateTimePicker($(this));
2531				} else {
2532					lazyInit($(this));
2533				}
2534			}
2535		});
2536
2537		return result;
2538	};
2539
2540	$.fn.datetimepicker.defaults = default_options;
2541
2542	function HighlightedDate(date, desc, style) {
2543		"use strict";
2544		this.date = date;
2545		this.desc = desc;
2546		this.style = style;
2547	}
2548};
2549;(function (factory) {
2550	if ( typeof define === 'function' && define.amd ) {
2551		// AMD. Register as an anonymous module.
2552		define(['jquery', 'jquery-mousewheel'], factory);
2553	} else if (typeof exports === 'object') {
2554		// Node/CommonJS style for Browserify
2555		module.exports = factory(require('jquery'));;
2556	} else {
2557		// Browser globals
2558		factory(jQuery);
2559	}
2560}(datetimepickerFactory));
2561
2562

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.