-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
57 lines (52 loc) · 1.29 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<!--<link rel="stylesheet" href="css/reset.css" />-->
<link rel="stylesheet" href="css/travelx-date.css" />
<style>
#ipt{
width: 150px;
height: 20px;
border: 1px solid #ccc;
display: block;
margin: 50px auto 0;
}
</style>
</head>
<body>
<div style="padding: 50px; text-align: right;">
<input type="text" id="ipt01" readonly="readonly" style="float: left;" />
<input type="text" id="ipt02" readonly="readonly" />
</div>
<script type="text/javascript" src="js/travelx-date.js" ></script>
<script>
var option01 = {
el: '#ipt01',
endDate: '',
default_Date:{
isRange: false,
d_range: []
},
cb: function( d, item ){
console.log( d, item );
option02.startDate = item.sy + '-' + item.s_m + '-' + item.s_d;
option02.default_Date.d_range = [ item.sy + '-' + item.s_m + '-' + item.s_d, item.sy + '-' + item.s_m + '-' + (item.s_d+3) ];
d2.init( option02 );
document.querySelector('#ipt02').click();
},
fep:'/'
};
var option02 = {
el: "#ipt02",
default_Date:{
isRange: true,
d_range: []
}
};
var d1 = new TDate( option01 );
var d2 = new TDate( option02 );
</script>
</body>
</html>