PageSourceSearch

https://tour3.balkan.ru/inc/datepicker.js

js balkan.ru collected 2026-09-24 22:07:12 UTC 2,001 bytes, 64 lines download raw bytes

1function ParseDate(sDate)
2{
3    var parts = sDate.split('.');
4    return new Date(parts[2], parts[1] - 1, parts[0]);
5}
6function ShiftEndDate(ctrlToShiftId, sStartDate, shiftDays)
7{
8    d = ParseDate(sStartDate);
9    d.setDate(d.getDate() + shiftDays);
10
11    sDays = d.getDate() + '';
12    sMonth = d.getMonth() + 1 + '';
13    sYear = d.getFullYear() + '';
14
15    if(sDays.length < 2)
16			sDays = '0' + sDays;
17		if(sMonth.length < 2)
18			sMonth = '0' + sMonth;
19		
20		document.getElementById(ctrlToShiftId).value = sDays + '.' + sMonth + '.' + sYear;
21	}
22	
23function CheckEndDate(ctrlDateFromId, ctrlDateToId, shiftDays)
24{
25    sStartDate = document.getElementById(ctrlDateFromId).value;
26    startDate = ParseDate(sStartDate);
27    sEndDate = document.getElementById(ctrlDateToId).value;
28    endDate = ParseDate(sEndDate);  
29
30    if(startDate > endDate)
31    {
32      alert('Начальная дата не может быть больше конечной!');
33      ShiftEndDate(ctrlDateToId, sStartDate, shiftDays);
34    }
35}
36
37
38function CheckEndDateIntersection(ctrlDateFromId, ctrlDateToId)
39{
40    sStartDate = document.getElementById(ctrlDateFromId).value;
41    startDate = ParseDate(sStartDate);
42    sEndDate = document.getElementById(ctrlDateToId).value;
43    endDate = ParseDate(sEndDate);  
44
45    if(startDate > endDate)
46    {
47        alert('Начальная дата не может быть больше конечной!');
48      ShiftEndDate(ctrlDateToId, sStartDate, 0);
49    }
50}
51
52function CheckBeginDateIntersection(ctrlDateToId, ctrlDateFromId)
53{
54    sEndDate = document.getElementById(ctrlDateToId).value;
55    endDate = ParseDate(sEndDate);
56    sStartDate = document.getElementById(ctrlDateFromId).value;
57    startDate = ParseDate(sStartDate);  
58
59    if(startDate > endDate)
60    {
61        alert('Начальная дата не может быть больше конечной!');
62      ShiftEndDate(ctrlDateFromId, sEndDate, 0);
63    }
64}

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.